Skip to content

Commit

Permalink
Reverted some changes for sample data wizard so that it works if the …
Browse files Browse the repository at this point in the history
…sample bundle is already installed
  • Loading branch information
goglepox committed Jun 20, 2012
1 parent 255baea commit 9e4dd44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
Expand Up @@ -17,7 +17,7 @@ public class OpenWizard extends AbstractHandler{

public Object execute( ExecutionEvent event ) throws ExecutionException {

NewDataProjectWizard wizard = new NewDataProjectWizard( null, null );
NewDataProjectWizard wizard = new NewDataProjectWizard();

wizard.init(HandlerUtil.getActiveWorkbenchWindow( event ).getWorkbench()
, null);
Expand Down
Expand Up @@ -49,8 +49,7 @@ public void run() {

//Install sample data project from this plugin

NewDataProjectWizard wizard =
new NewDataProjectWizard( null, null );
NewDataProjectWizard wizard = new NewDataProjectWizard();
wizard.init(PlatformUI.getWorkbench(), null);

// Create the wizard dialog
Expand Down
Expand Up @@ -15,7 +15,7 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

import net.bioclipse.core.business.BioclipseException;
import net.bioclipse.core.util.LogUtils;
Expand All @@ -38,10 +38,8 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.internal.p2.discovery.Catalog;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
Expand All @@ -54,8 +52,8 @@
*
*/
@SuppressWarnings("restriction")
public class NewDataProjectWizard extends DiscoveryWizard implements
INewWizard, IExecutableExtension {
public class NewDataProjectWizard extends Wizard implements INewWizard,
IExecutableExtension {

private WizardNewProjectCreationPage fFirstPage;
private SelectDataFoldersPage folPage;
Expand All @@ -67,10 +65,8 @@ public class NewDataProjectWizard extends DiscoveryWizard implements
private static final Logger logger =
Logger.getLogger(NewDataProjectWizard.class);

public NewDataProjectWizard(Catalog catalog,
CatalogConfiguration configuration) {
public NewDataProjectWizard() {

super( catalog, configuration );
setDefaultPageImageDescriptor(Activator.getImageDescriptor("icons/wiz/wiz1.png"));
setWindowTitle("New Sample Data project");
}
Expand Down Expand Up @@ -146,7 +142,6 @@ public boolean performCancel() {
@Override
public boolean performFinish() {

super.performFinish();
try
{
WorkspaceModifyOperation op =
Expand Down Expand Up @@ -193,7 +188,7 @@ public void init(IWorkbench workbench, IStructuredSelection selection) {
protected void createProject(IProgressMonitor monitor)
{

ArrayList<InstallableFolder> folders=folPage.getFolders();
List<InstallableFolder> folders = folPage.getFolders();
monitor.beginTask("Copying data",folders.size()+2);

try
Expand Down

0 comments on commit 9e4dd44

Please sign in to comment.