merge
authorfturovic <frank.turovich@nokia.com>
Thu, 04 Jun 2009 12:02:29 -0500
changeset 206 986061a6ce86
parent 205 2b3a45f17e6a (current diff)
parent 204 c14cf2c1fe78 (diff)
child 207 b15c942fd014
merge
debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ContextConfigurationTabGroup.java
debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ContextMainTab.java
--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java	Thu Jun 04 12:02:29 2009 -0500
@@ -72,7 +72,6 @@
 	// If you change any of these, please be sure to change them there, as well.
 	
 	public static final String PREFIX = "com.nokia.cdt.debug.cw.symbian.SettingsData"; //$NON-NLS-1$
-	public static final String LaunchConfig_Context= PREFIX + ".LaunchConfig_Context"; //$NON-NLS-1$
 	public static final String LaunchConfig_Emulator = PREFIX + ".LaunchConfig_Emulator"; //$NON-NLS-1$
 	public static final String LaunchConfig_AppTRK = PREFIX + ".LaunchConfig_AppTRK"; //$NON-NLS-1$
 	public static final String LaunchConfig_SysTRK = PREFIX + ".LaunchConfig_SysTRK"; //$NON-NLS-1$
@@ -485,57 +484,51 @@
 		configuration.setAttribute( PreferenceConstants.J_PN_FilesToTransfer, "" ); //$NON-NLS-1$
 		
 		// only do this for system TRK configurations
-		try {
-			if (configuration.getType().getIdentifier().compareTo(SYS_TRK_LAUNCH_TYPE_ID) == 0 ) {
-				if (project != null) {
-					
-			        ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
-					if (cpi != null) {
-						ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration();
-						
-						String defaultTargetPath = "C:\\"; //$NON-NLS-1$
-						if (buildConfig.getSDK().isEKA2()) {
-							// C:\\sys\bin for eka2
-							defaultTargetPath += "sys\\bin\\"; //$NON-NLS-1$
+		if (project != null) {
+			
+	        ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
+			if (cpi != null) {
+				ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration();
+				
+				String defaultTargetPath = "C:\\"; //$NON-NLS-1$
+				if (buildConfig.getSDK().isEKA2()) {
+					// C:\\sys\bin for eka2
+					defaultTargetPath += "sys\\bin\\"; //$NON-NLS-1$
+				}
+				String prefsData = "";
+				
+				// we'll add all binaries that could be built by the config, but will only enabled those
+				// that are actually being built.
+				List<IPath> builtComponents = EpocEngineHelper.getComponentsBuiltByConifguration(buildConfig);
+				
+				// add the binaries and any resource-type files generated by all mmp files in the project
+				for (IPath mmp : EpocEngineHelper.getMMPFilesForBuildConfiguration(buildConfig)) {
+					String enabled = builtComponents.contains(mmp) ? ",1," : ",0,";
+					IPath hp = EpocEngineHelper.getHostPathForExecutable(buildConfig, mmp);
+					if (hp != null) {
+						IPath tp = EpocEngineHelper.getTargetPathForExecutable(buildConfig, mmp);
+						if (tp == null) {
+							tp = new Path(defaultTargetPath).append(hp.lastSegment());
 						}
-						String prefsData = "";
-						
-						// we'll add all binaries that could be built by the config, but will only enabled those
-						// that are actually being built.
-						List<IPath> builtComponents = EpocEngineHelper.getComponentsBuiltByConifguration(buildConfig);
-						
-						// add the binaries and any resource-type files generated by all mmp files in the project
-						for (IPath mmp : EpocEngineHelper.getMMPFilesForBuildConfiguration(buildConfig)) {
-							String enabled = builtComponents.contains(mmp) ? ",1," : ",0,";
-							IPath hp = EpocEngineHelper.getHostPathForExecutable(buildConfig, mmp);
-							if (hp != null) {
-								IPath tp = EpocEngineHelper.getTargetPathForExecutable(buildConfig, mmp);
-								if (tp == null) {
-									tp = new Path(defaultTargetPath).append(hp.lastSegment());
-								}
-								prefsData += hp.toOSString() + "," + tp.toOSString() + enabled; //$NON-NLS-1$
-							}
-							
-							HashMap<String, String> hostTargetRSRCMap = EpocEngineHelper.getHostAndTargetResources(buildConfig, mmp);
-							// Add resource files...
-							for (String currHostRSRC : hostTargetRSRCMap.keySet()) {
-								prefsData += currHostRSRC + "," + hostTargetRSRCMap.get(currHostRSRC) + new Path(currHostRSRC).lastSegment() + enabled; //$NON-NLS-1$
-							}
-						}
-						
-						// check the project for image makefiles
-						HashMap<String, String> hostTargetImagesMap = EpocEngineHelper.getHostAndTargetImages(buildConfig);
-						for (String currHostImg : hostTargetImagesMap.keySet()) {
-							prefsData += currHostImg + "," + hostTargetImagesMap.get(currHostImg) + ",1,"; //$NON-NLS-1$ //$NON-NLS-2$
-						}
-						
-						// Add the files to transfer to the pref
-						configuration.setAttribute( PreferenceConstants.J_PN_FilesToTransfer, prefsData );
+						prefsData += hp.toOSString() + "," + tp.toOSString() + enabled; //$NON-NLS-1$
+					}
+					
+					HashMap<String, String> hostTargetRSRCMap = EpocEngineHelper.getHostAndTargetResources(buildConfig, mmp);
+					// Add resource files...
+					for (String currHostRSRC : hostTargetRSRCMap.keySet()) {
+						prefsData += currHostRSRC + "," + hostTargetRSRCMap.get(currHostRSRC) + new Path(currHostRSRC).lastSegment() + enabled; //$NON-NLS-1$
 					}
 				}
+				
+				// check the project for image makefiles
+				HashMap<String, String> hostTargetImagesMap = EpocEngineHelper.getHostAndTargetImages(buildConfig);
+				for (String currHostImg : hostTargetImagesMap.keySet()) {
+					prefsData += currHostImg + "," + hostTargetImagesMap.get(currHostImg) + ",1,"; //$NON-NLS-1$ //$NON-NLS-2$
+				}
+				
+				// Add the files to transfer to the pref
+				configuration.setAttribute( PreferenceConstants.J_PN_FilesToTransfer, prefsData );
 			}
-		} catch (CoreException e) {
-			SymbianPlugin.log(e);
 		}
 	}
 	
@@ -712,10 +705,6 @@
 		
 		setInternalPreferences(configuration, settingsGroup);
 
-		if (settingsGroup.equals(LaunchConfig_Context)) {
-			setContextMainTab(configuration, project);
-		}
-	
 		if (settingsGroup.equals(LaunchConfig_Emulator)) {
 			setEmulationMainTab(configuration, project);
 			setEmulationDebuggerTab(configuration, project);
@@ -730,9 +719,13 @@
 		}
 
 		if (settingsGroup.equals(LaunchConfig_AppTRK)) {
-				setInstallationTab(configuration, project);
+			setInstallationTab(configuration, project);
 		}
 		
+		if (settingsGroup.equals(LaunchConfig_SysTRK)) {
+			setFileTransferTab(configuration, project);
+		}
+	
 		if (settingsGroup.equals(LaunchConfig_Trace32) ||
 				settingsGroup.equals(LaunchConfig_SophiaSTI))
 		{
@@ -744,8 +737,6 @@
 		if (settingsGroup.equals(LaunchConfig_AppTRK) || settingsGroup.equals(LaunchConfig_SysTRK)) {
 			setTrkMainTab(configuration, project);
 			setTrkDebuggerTab(configuration, project);
-			setFileTransferTab(configuration, project);
-			
 			
 			// TRK Debugging: specify TRK protocol plugin.
 			//
@@ -818,17 +809,6 @@
 
 	}
 
-	private static void setContextMainTab(
-			ILaunchConfigurationWorkingCopy configuration, IProject project) {
-		if (project != null) {
-			String projectName = project.getName();
-			configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
-			configuration.setMappedResources( new IResource[] { project });
-			configuration.rename(DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(projectName));
-		}
-	}
-
-
 	/**
 	 * Should the debugger launch the Symbian emulator (epoc.exe) as the debug process?
 	 * This should be true in all cases except when the executable is an '.exe'.
--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SymbianPlugin.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SymbianPlugin.java	Thu Jun 04 12:02:29 2009 -0500
@@ -17,21 +17,16 @@
 
 package com.nokia.cdt.debug.cw.symbian;
 
-import java.io.File;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.console.ConsolePlugin;
 import org.eclipse.ui.console.IConsole;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
-import com.freescale.cdt.debug.cw.core.CWPlugin;
 import com.freescale.cdt.debug.cw.core.ui.console.LoggingConsole;
-import com.nokia.carbide.cpp.internal.support.SupportPlugin;
 import com.nokia.cpp.internal.api.utils.core.Logging;
 
 /**
@@ -77,27 +72,6 @@
 		// Force the the core FSL UI plugin to load; this ensures the UI registers
 		// its callback into the core (non-UI) plugin before it's actually needed
 		com.freescale.cdt.debug.cw.core.ui.CWDebugUIPlugin.getDefault();
-
-		IPath basePath = SupportPlugin.getDefault().getDebuggerDirectory();
-
-		Path dePath = new Path(basePath.toPortableString());
-		String deFilePath = dePath.append("de.exe").toOSString(); //$NON-NLS-1$
-
-		Path cwNativePath = new Path(basePath.toPortableString());
-		String cwNativeFilePath = cwNativePath.append("CWNative.dll") //$NON-NLS-1$
-				.toOSString();
-
-		File deFile = new File(deFilePath);
-		if (deFile.exists())
-			CWPlugin.getDefault().getPluginPreferences().setValue(
-					CWPlugin.GLOBPREF_DE_LOCATION, deFile.getAbsolutePath());
-		else {
-			// what to do here?
-		}
-
-		File cwNativeFile = new File(cwNativeFilePath);
-		boolean cwNativeLoaded = CWPlugin.getDefault().loadCWNative(cwNativeFile.getAbsolutePath());
-		assert(cwNativeLoaded);
 	}
 
 	/**
--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/CarbideSourceFilesProvider.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/CarbideSourceFilesProvider.java	Thu Jun 04 12:02:29 2009 -0500
@@ -16,8 +16,6 @@
 */
 package com.nokia.cdt.debug.cw.symbian.ui.executables;
 
-import java.util.ArrayList;
-
 import org.eclipse.cdt.debug.core.executables.Executable;
 import org.eclipse.cdt.debug.core.executables.ISourceFilesProvider;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -29,13 +27,14 @@
 public class CarbideSourceFilesProvider extends PlatformObject implements
 		ISourceFilesProvider {
 
-	public String[] getSourceFiles(Executable executable,
-			IProgressMonitor monitor) {	
-		ArrayList<String> sourceFiles = new ArrayList<String>();
+	public String[] getSourceFiles(Executable executable, IProgressMonitor monitor) {	
 		ISymbolFile symFile = SymbolReaderManager.getSymbolReaderManager().openSymbolFile(executable.getPath().toOSString());
-		String[] sourceArray = symFile.getSourceFiles();
-		symFile.close();
-		return sourceArray;
+		if (symFile != null) {
+			String[] sourceArray = symFile.getSourceFiles();
+			symFile.close();
+			return sourceArray;
+		}
+		return new String[0];
 	}
 
 	public int getPriority(Executable executable) {
--- a/debuggercdi/com.nokia.cdt.debug.launch/plugin.xml	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/plugin.xml	Thu Jun 04 12:02:29 2009 -0500
@@ -5,16 +5,6 @@
    <extension
          point="org.eclipse.debug.core.launchConfigurationTypes">
 
-     <launchConfigurationType
-            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
-            sourcePathComputerId="com.nokia.cdt.debug.cw.symbian.CarbideSourcePathComputer"
-            name="Symbian OS Application"
-            delegate="com.nokia.cdt.internal.debug.launch.ContextLaunchDelegate"
-            modes="run,debug"
-            public="true"
-            id="com.nokia.cdt.debug.launch.contextLaunch">
-      </launchConfigurationType>
-
       <launchConfigurationType
             sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
             sourcePathComputerId="com.nokia.cdt.debug.cw.symbian.CarbideSourcePathComputer"
@@ -80,11 +70,6 @@
          point="org.eclipse.debug.ui.launchConfigurationTypeImages">
       <launchConfigurationTypeImage
             icon="icons/launch_config_file_16x16.png"
-            configTypeID="com.nokia.cdt.debug.launch.contextLaunch"
-            id="com.nokia.cdt.debug.launch.contextLaunchImage">
-      </launchConfigurationTypeImage>
-      <launchConfigurationTypeImage
-            icon="icons/launch_config_file_16x16.png"
             configTypeID="com.nokia.cdt.debug.launch.emulationLaunch"
             id="com.nokia.cdt.debug.launch.emulationLaunchImage">
       </launchConfigurationTypeImage>
@@ -120,15 +105,6 @@
    <extension
          point="org.eclipse.debug.ui.launchConfigurationTabGroups">
       <launchConfigurationTabGroup
-            type="com.nokia.cdt.debug.launch.contextLaunch"
-            class="com.nokia.cdt.internal.debug.launch.ui.ContextConfigurationTabGroup"
-            id="com.nokia.cdt.debug.launch.contextLaunchTabGroup">
-      </launchConfigurationTabGroup>
-    </extension>
-
-   <extension
-         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
-      <launchConfigurationTabGroup
             type="com.nokia.cdt.debug.launch.emulationLaunch"
             class="com.nokia.cdt.internal.debug.launch.ui.EmulationConfigurationTabGroup"
             id="com.nokia.cdt.debug.launch.emulationLaunchTabGroup">
@@ -198,7 +174,7 @@
                    <or>
                      <instanceof value="org.eclipse.cdt.core.model.IBinary"/>
                      <instanceof value="org.eclipse.cdt.core.model.ICProject"/>
-                     <instanceof value="com.nokia.cdt.debug.cw.symbian.ui.executables.Executable"/>
+                     <instanceof value="org.eclipse.cdt.debug.core.executables.Executable"/>
                      <test
                            forcePluginActivation="true"
                            property="org.eclipse.cdt.launch.isExecutable"/>
@@ -231,19 +207,10 @@
   		 </contextualLaunch>
          <description
              mode="run"
-             description="Runs a Symbian OS executable on either the emulator or a phone"/>
+             description="Runs a Symbian OS executable"/>
           <description
              mode="debug"
-             description="Debugs a Symbian OS executable on either the emulator or a phone"/>
-         <perspective
-               id="com.nokia.carbide.cpp.CarbideCppPerspective">
-         </perspective>
-         <perspective
-               id="org.eclipse.debug.ui.DebugPerspective">
-         </perspective>
-         <configurationType
-               id="com.nokia.cdt.debug.launch.contextLaunch">
-         </configurationType>
+             description="Debugs a Symbian OS executable"/>
       </shortcut>
      </extension>
    
@@ -271,7 +238,7 @@
 	<extension point="org.eclipse.core.runtime.adapters">
          <factory 
             class="" 
-            adaptableType="com.nokia.cdt.debug.cw.symbian.ui.executables.Executable">
+            adaptableType="org.eclipse.cdt.debug.core.executables.Executable">
             <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
          </factory>
     </extension>
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AttachMainTab.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AttachMainTab.java	Thu Jun 04 12:02:29 2009 -0500
@@ -23,7 +23,6 @@
 import com.nokia.carbide.remoteconnections.interfaces.IClientServiceSiteUI.IListener;
 import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
 
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -48,7 +47,7 @@
 		Composite comp = new Composite(parent, SWT.NONE);
 		setControl(comp);
 		
-		LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.ATTACH_MAIN);
+		LaunchPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.ATTACH_MAIN);
 		
 		GridLayout topLayout = new GridLayout();
 		comp.setLayout(topLayout);
@@ -73,7 +72,6 @@
 		if (wantsTerminalOption() /*&& ProcessFactory.supportesTerminal()*/) {
 			createTerminalOption(comp, 1);
 		}
-		LaunchUIPlugin.setDialogShell(parent.getShell());
 	}
 
 	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ContextConfigurationTabGroup.java	Thu Jun 04 12:01:20 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-package com.nokia.cdt.internal.debug.launch.ui;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-
-import com.nokia.cdt.debug.cw.symbian.SettingsData;
-import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
-
-public class ContextConfigurationTabGroup extends
-		AbstractLaunchConfigurationTabGroup {
-
-	public ContextConfigurationTabGroup() {
-	}
-
-	public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
-		ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
-				new ContextMainTab(),
-			};
-			setTabs(tabs);
-	}
-
-	/**
-	 * Set default for all preferences related to this launch configuration.
-	 * 
-	 * @see ILaunchConfigurationTabGroup#setDefaults(ILaunchConfigurationWorkingCopy)
-	 */
-	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
-		// Call this to make sure options on those CDT common tabs such as "Common"
-		// and "Source" have correct default.
-		super.setDefaults(config);
-
-		// Get the current selected project in C project view.
-		IProject project = LaunchPlugin.getSelectedProject();
-
-		SettingsData.setDefaults(config, SettingsData.LaunchConfig_Context, project);
-	}
-
-}
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ContextMainTab.java	Thu Jun 04 12:01:20 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-package com.nokia.cdt.internal.debug.launch.ui;
-
-import java.util.ArrayList;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.ICDescriptor;
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.launch.internal.ui.LaunchImages;
-import org.eclipse.cdt.launch.internal.ui.LaunchMessages;
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
-import org.eclipse.cdt.launch.ui.CLaunchConfigurationTab;
-import org.eclipse.cdt.ui.CElementLabelProvider;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-
-public class ContextMainTab extends CLaunchConfigurationTab {
-
-	private Text thisLaunchUsesText;
-	protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
-	private String filterPlatform = EMPTY_STRING;
-
-	// Project UI widgets
-	protected Label fProjLabel;
-	protected Text fProjText;
-	protected Button fProjButton;
-
-	public void createControl(Composite parent) {
-		Composite comp = new Composite(parent, SWT.NONE);
-		setControl(comp);
-
-		LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.CONTEXT_MAIN);
-
-		GridLayout topLayout = new GridLayout();
-		comp.setLayout(topLayout);
-
-		createVerticalSpacer(comp, 1);
-		createProjectGroup(comp, 1);
-
-		thisLaunchUsesText = new Text(comp, SWT.WRAP | SWT.READ_ONLY | SWT.MULTI);
-		thisLaunchUsesText.setText(Messages.getString("ContextMainTab.0")); //$NON-NLS-1$
-		final GridData gd_thisLaunchUsesText = new GridData(SWT.FILL, SWT.CENTER, true, false);
-		thisLaunchUsesText.setLayoutData(gd_thisLaunchUsesText);
-		LaunchUIPlugin.setDialogShell(parent.getShell());
-	}
-
-	protected void createProjectGroup(Composite parent, int colSpan) {
-		Composite projComp = new Composite(parent, SWT.NONE);
-		GridLayout projLayout = new GridLayout();
-		projLayout.numColumns = 2;
-		projLayout.marginHeight = 0;
-		projLayout.marginWidth = 0;
-		projComp.setLayout(projLayout);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = colSpan;
-		projComp.setLayoutData(gd);
-
-		fProjLabel = new Label(projComp, SWT.NONE);
-		fProjLabel.setText(LaunchMessages.getString("CMainTab.&ProjectColon")); //$NON-NLS-1$
-		gd = new GridData();
-		gd.horizontalSpan = 2;
-		fProjLabel.setLayoutData(gd);
-
-		fProjText = new Text(projComp, SWT.SINGLE | SWT.BORDER);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		fProjText.setLayoutData(gd);
-		fProjText.addModifyListener(new ModifyListener() {
-
-			public void modifyText(ModifyEvent evt) {
-				updateLaunchConfigurationDialog();
-			}
-		});
-
-		fProjButton = createPushButton(projComp, LaunchMessages.getString("Launch.common.Browse_1"), null); //$NON-NLS-1$
-		fProjButton.addSelectionListener(new SelectionAdapter() {
-
-			public void widgetSelected(SelectionEvent evt) {
-				handleProjectButtonSelected();
-				updateLaunchConfigurationDialog();
-			}
-		});
-	}
-
-	/**
-	 * Return an array a ICProject whose platform match that of the runtime env.
-	 */
-	protected ICProject[] getCProjects() throws CModelException {
-		ICProject cproject[] = CoreModel.getDefault().getCModel().getCProjects();
-		ArrayList list = new ArrayList(cproject.length);
-
-		for (int i = 0; i < cproject.length; i++) {
-			ICDescriptor cdesciptor = null;
-			try {
-				cdesciptor = CCorePlugin.getDefault().getCProjectDescription((IProject)cproject[i].getResource(), false);
-				if (cdesciptor != null) {
-					String projectPlatform = cdesciptor.getPlatform();
-					if (filterPlatform.equals("*") //$NON-NLS-1$
-							|| projectPlatform.equals("*") //$NON-NLS-1$
-							|| filterPlatform.equalsIgnoreCase(projectPlatform) == true) {
-						list.add(cproject[i]);
-					}
-				} else {
-					list.add(cproject[i]);
-				}
-			} catch (CoreException e) {
-				list.add(cproject[i]);
-			}
-		}
-		return (ICProject[])list.toArray(new ICProject[list.size()]);
-	}
-
-	/**
-	 * Realize a C Project selection dialog and return the first selected project, or null if there
-	 * was none.
-	 */
-	protected ICProject chooseCProject() {
-		try {
-			ICProject[] projects = getCProjects();
-
-			ILabelProvider labelProvider = new CElementLabelProvider();
-			ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
-			dialog.setTitle(LaunchMessages.getString("CMainTab.Project_Selection")); //$NON-NLS-1$
-			dialog.setMessage(LaunchMessages.getString("CMainTab.Choose_project_to_constrain_search_for_program")); //$NON-NLS-1$
-			dialog.setElements(projects);
-
-			ICProject cProject = getCProject();
-			if (cProject != null) {
-				dialog.setInitialSelections(new Object[]{cProject});
-			}
-			if (dialog.open() == Window.OK) {
-				return (ICProject)dialog.getFirstResult();
-			}
-		} catch (CModelException e) {
-			LaunchUIPlugin.errorDialog("Launch UI internal error", e); //$NON-NLS-1$			
-		}
-		return null;
-	}
-
-	/**
-	 * Show a dialog that lets the user select a project. This in turn provides context for the main
-	 * type, allowing the user to key a main type name, or constraining the search for main types to
-	 * the specified project.
-	 */
-	protected void handleProjectButtonSelected() {
-		ICProject project = chooseCProject();
-		if (project == null) {
-			return;
-		}
-
-		String projectName = project.getElementName();
-		fProjText.setText(projectName);
-	}
-
-	public String getName() {
-		return "Main"; //$NON-NLS-1$
-	}
-
-	public Image getImage() {
-		return LaunchImages.get(LaunchImages.IMG_VIEW_MAIN_TAB);
-	}
-
-	public void initializeFrom(ILaunchConfiguration configuration) {
-		String projectName = EMPTY_STRING;
-		try {
-			projectName = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
-		} catch (CoreException ce) {
-			LaunchUIPlugin.log(ce);
-		}
-		fProjText.setText(projectName);
-	}
-
-	/**
-	 * Return the ICProject corresponding to the project name in the project name text field, or
-	 * null if the text does not match a project name.
-	 */
-	protected ICProject getCProject() {
-		String projectName = fProjText.getText().trim();
-		if (projectName.length() < 1) {
-			return null;
-		}
-		return CoreModel.getDefault().getCModel().getCProject(projectName);
-	}
-
-	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
-		ICProject cProject = this.getCProject();
-		if (cProject != null)
-			configuration.setMappedResources(new IResource[] { cProject.getProject() });
-		configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
-	}
-
-	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
-		configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
-		ICElement cElement = null;
-		cElement = getContext(configuration, getPlatform(configuration));
-		if (cElement != null) {
-			initializeCProject(cElement, configuration);
-		}
-	}
-
-}
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/EmulationMainTab.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/EmulationMainTab.java	Thu Jun 04 12:02:29 2009 -0500
@@ -19,7 +19,6 @@
 import com.freescale.cdt.debug.cw.core.settings.DebuggerCommonData;
 import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
 
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -46,7 +45,7 @@
 		Composite comp = new Composite(parent, SWT.NONE);
 		setControl(comp);
 		
-		LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.EMULATION_MAIN);
+		LaunchPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.EMULATION_MAIN);
 		// Move the focus from the launch config view to this composite. Afterward the focus will move with the tabs.
 		comp.setFocus(); 
 		
@@ -81,7 +80,6 @@
 		if (wantsTerminalOption() /*&& ProcessFactory.supportesTerminal()*/) {
 			createTerminalOption(comp, 1);
 		}
-		LaunchUIPlugin.setDialogShell(parent.getShell());
 
 		ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_BUILD);
 
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeArgumentsTab.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeArgumentsTab.java	Thu Jun 04 12:02:29 2009 -0500
@@ -20,7 +20,6 @@
 
 import org.eclipse.cdt.launch.internal.ui.LaunchImages;
 import org.eclipse.cdt.launch.internal.ui.LaunchMessages;
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
 import org.eclipse.cdt.launch.ui.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -36,6 +35,8 @@
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
 
+import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
+
 public class RunModeArgumentsTab extends CLaunchConfigurationTab {
 
 	protected Text argumentsText;
@@ -48,7 +49,7 @@
 	    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
 	    setControl(composite);
 	    
-		LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
+		LaunchPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
 			
 	    Group group = new Group(composite, SWT.NONE);
 	    Font font = composite.getFont();
@@ -80,8 +81,7 @@
 			argumentsText.setText(configuration.getAttribute(PreferenceConstants.J_PN_ProgramArguments, "")); //$NON-NLS-1$
 		}
 		catch (CoreException e) {
-			setErrorMessage(LaunchMessages.getFormattedString("Launch.common.Exception_occurred_reading_configuration_EXCEPTION", e.getStatus().getMessage())); //$NON-NLS-1$
-			LaunchUIPlugin.log(e);
+			LaunchPlugin.log(e);
 		}
 	}
 
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeMainTab.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeMainTab.java	Thu Jun 04 12:02:29 2009 -0500
@@ -19,8 +19,6 @@
 import java.util.StringTokenizer;
 
 import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.launch.internal.ui.LaunchMessages;
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
 import org.eclipse.core.resources.IResourceChangeEvent;
 import org.eclipse.core.resources.IResourceChangeListener;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -68,7 +66,7 @@
 		Composite comp = new Composite(parent, SWT.NONE);
 		setControl(comp);
 		
-		LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.RUN_MODE_MAIN);
+		LaunchPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.RUN_MODE_MAIN);
 		
 		GridLayout topLayout = new GridLayout();
 		comp.setLayout(topLayout);
@@ -97,7 +95,6 @@
 		if (wantsTerminalOption() /*&& ProcessFactory.supportesTerminal()*/) {
 			createTerminalOption(comp, 1);
 		}
-		LaunchUIPlugin.setDialogShell(parent.getShell());
 
 		ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_BUILD);
 }
@@ -146,8 +143,7 @@
 		try {
 			remoteText.setText(config.getAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, "")); //$NON-NLS-1$
 		} catch (CoreException e) {
-			setErrorMessage(LaunchMessages.getFormattedString("Launch.common.Exception_occurred_reading_configuration_EXCEPTION", e.getStatus().getMessage())); //$NON-NLS-1$
-			LaunchUIPlugin.log(e);
+			LaunchPlugin.log(e);
 		}
 		try {
 	        if (!RemoteConnectionsTRKHelper.configUsesConnectionAttribute(config)) {
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/StopModeMainTab.java	Thu Jun 04 12:01:20 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/StopModeMainTab.java	Thu Jun 04 12:02:29 2009 -0500
@@ -16,13 +16,14 @@
 */
 package com.nokia.cdt.internal.debug.launch.ui;
 
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 
+import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
+
 public class StopModeMainTab extends CarbideMainTab {
 
 	
@@ -30,7 +31,7 @@
 		Composite comp = new Composite(parent, SWT.NONE);
 		setControl(comp);
 		
-		LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.STOP_MODE_MAIN);
+		LaunchPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.STOP_MODE_MAIN);
 		
 		GridLayout topLayout = new GridLayout();
 		comp.setLayout(topLayout);
@@ -50,7 +51,6 @@
 		if (wantsTerminalOption() /*&& ProcessFactory.supportesTerminal()*/) {
 			createTerminalOption(comp, 1);
 		}
-		LaunchUIPlugin.setDialogShell(parent.getShell());
 	}
 
 	public void setDefaults(ILaunchConfigurationWorkingCopy config) {