debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizard.java
branchRCL_2_4
changeset 953 68b6a294ab01
parent 828 17e718655d73
child 1299 c6abac939087
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizard.java	Sun Feb 14 20:52:26 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizard.java	Mon Feb 15 13:20:03 2010 -0600
@@ -30,11 +30,9 @@
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
 
 import com.nokia.carbide.cpp.ui.CarbideUIPlugin;
 import com.nokia.carbide.cpp.ui.ICarbideSharedImages;
@@ -44,11 +42,10 @@
 import com.nokia.cpp.internal.api.utils.core.Logging;
 import com.nokia.cpp.internal.api.utils.core.Pair;
 
-public class LaunchCreationWizard extends Wizard {
+public class LaunchCreationWizard extends Wizard implements ILaunchCreationWizard {
 
 	private MainExecutableSelectionWizardPage fBinarySelectionPage;
 	private LaunchWizardSummaryPage fEmulationSummaryPage;
-	private LaunchCategorySelectionPage fCategorySelectionPage;
 	private LaunchWizardSelectionPage fWizardSelectionPage;
     private BuildOptionsSelectionPage fBuildOptionsSelectionPage;
 	private ILaunchConfigurationWorkingCopy launchConfig;
@@ -56,6 +53,7 @@
 	private IProject project;
 	private String configurationName;
 	private List<AbstractLaunchWizard> wizards = new ArrayList<AbstractLaunchWizard>();
+	private String categoryId;
 	
 	public LaunchCreationWizard(IProject project, String configurationName, 
 										List<IPath> mmps, List<IPath> exes, IPath defaultExecutable,  
@@ -76,7 +74,6 @@
 			fBinarySelectionPage = new MainExecutableSelectionWizardPage(mmps, exes, defaultExecutable, true, emulatorPath, emulatorOnly, fEmulationSummaryPage);
 		}
 		else {
-			fCategorySelectionPage = new LaunchCategorySelectionPage(this);
 	        fWizardSelectionPage = new LaunchWizardSelectionPage(this, mmps, exes, defaultExecutable, project, configurationName, mode);
 		}
 	}
@@ -117,7 +114,6 @@
     		addPage(fEmulationSummaryPage);
     	} 
     	else if (fWizardSelectionPage != null) {
-            addPage(fCategorySelectionPage);
             addPage(fWizardSelectionPage);
     	}
     }
@@ -127,7 +123,7 @@
 		return true;
 	}
 
-	public void init(IWorkbench workbench, IStructuredSelection selection) {
+	public void init() {
         setWindowTitle(Messages.getString("LaunchCreationWizard.0")); //$NON-NLS-1$
 		setDefaultPageImageDescriptor(CarbideUIPlugin.getSharedImages().getImageDescriptor(ICarbideSharedImages.IMG_NEW_LAUNCH_CONFIG_WIZARD_BANNER));
     }
@@ -155,8 +151,12 @@
 		return shouldOpenLaunchDialog;
 	}
 	
-	public String getSelectedCategoryId() {
-		return fCategorySelectionPage.getSelectedCategoryId();
+	public void setCategoryId(String categoryId) {
+		this.categoryId = categoryId;
+	}
+	
+	public String getCategoryId() {
+		return categoryId;
 	}
 	
 	public List<Wizard> getWizardsForCategory(String categoryId) {
@@ -170,30 +170,12 @@
 	}
 	
 	private void loadWizards(List<IPath> mmps, List<IPath> exes, IPath defaultExecutable, String mode) {
-		AppTRKLaunchWizard appTRKWizard = new AppTRKLaunchWizard(mmps, exes, defaultExecutable, project, configurationName);
-		if (appTRKWizard.supportsMode(mode)) {
-			appTRKWizard.addPages();
-			wizards.add(appTRKWizard);
-		}
-		
-		SystemTRKLaunchWizard sysTRKWizard = new SystemTRKLaunchWizard(mmps, exes, defaultExecutable, project, configurationName);
-		if (sysTRKWizard.supportsMode(mode)) {
-			sysTRKWizard.addPages();
-			wizards.add(sysTRKWizard);
-		}
-
 		Trace32LaunchWizard trace32Wizard = new Trace32LaunchWizard(mmps, exes, defaultExecutable, project, configurationName); 
 		if (trace32Wizard.supportsMode(mode)) {
 			trace32Wizard.addPages();
 			wizards.add(trace32Wizard);
 		}
 
-		AttachTRKLaunchWizard attachTRKWizard = new AttachTRKLaunchWizard(mmps, exes, defaultExecutable, project, configurationName);
-		if (attachTRKWizard.supportsMode(mode)) {
-			attachTRKWizard.addPages();
-			wizards.add(attachTRKWizard);
-		}
-
 		// load any wizard extensions
 		IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
 		IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(LaunchPlugin.PLUGIN_ID + ".launchWizardExtension"); //$NON-NLS-1$