--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Mon Aug 10 15:49:39 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Mon Aug 10 15:50:55 2009 -0500
@@ -42,6 +42,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.widgets.Display;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
@@ -269,12 +270,12 @@
private void persistCache() {
// persist the cache between IDE launches.
try {
- ICarbideProjectInfo cpi = carbideBuildConfig.getCarbideProject();
+ final ICarbideProjectInfo cpi = carbideBuildConfig.getCarbideProject();
if (cpi == null) {
return;
}
- ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(cpi.getProject());
+ ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(cpi.getProject(), false);
if (projDes != null) {
ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getDisplayString());
if (configDes != null) {
@@ -292,8 +293,17 @@
}
storage.setAttribute(FILES_CACHE, filesCacheValue);
- // save the CDT project description
- CCorePlugin.getDefault().setProjectDescription(cpi.getProject(), projDes, true, new NullProgressMonitor());
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(cpi.getProject());
+ try {
+ // save the CDT project description
+ CCorePlugin.getDefault().setProjectDescription(cpi.getProject(), projDes, true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ CarbideBuilderPlugin.log(e);
+ }
+ }
+ });
}
}
} catch (CoreException e) {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Mon Aug 10 15:49:39 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Mon Aug 10 15:50:55 2009 -0500
@@ -27,6 +27,7 @@
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.content.*;
+import org.eclipse.swt.widgets.Display;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
@@ -309,8 +310,8 @@
private void persistCache() {
// persist the cache between IDE launches.
try {
- IProject project = carbideBuildConfig.getCarbideProject().getProject();
- ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(project);
+ final IProject project = carbideBuildConfig.getCarbideProject().getProject();
+ ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(project, false);
if (projDes != null) {
ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getDisplayString());
if (configDes != null) {
@@ -344,8 +345,17 @@
}
storage.setAttribute(FILES_CACHE, filesCacheValue);
- // save the CDT project description
- CCorePlugin.getDefault().setProjectDescription(project, projDes, true, new NullProgressMonitor());
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(project);
+ try {
+ // save the CDT project description
+ CCorePlugin.getDefault().setProjectDescription(project, projDes, true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ CarbideBuilderPlugin.log(e);
+ }
+ }
+ });
}
}
} catch (CoreException e) {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectInfo.java Mon Aug 10 15:49:39 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectInfo.java Mon Aug 10 15:50:55 2009 -0500
@@ -83,9 +83,9 @@
this.projectTracker = new TrackedResource(project);
try {
- ICProjectDescription projDes = getProjectDescription();
+ ICProjectDescription projDes = getProjectDescription(false);
if (projDes != null) {
- initializeDefaults(projDes);
+ initializeDefaults();
ICStorageElement storage = projDes.getStorage(CarbideBuilderPlugin.getCarbideBuilderExtensionID(), false);
if (storage != null) {
@@ -232,7 +232,7 @@
}
}
- protected void initializeDefaults(ICProjectDescription projDes) {
+ protected void initializeDefaults() {
overrideWorkspaceSettings = false;
if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(projectTracker.getProject())) {
@@ -260,7 +260,7 @@
List<ICarbideBuildConfiguration> configs = new ArrayList<ICarbideBuildConfiguration>();
- ICProjectDescription projectDescription = getProjectDescription();
+ ICProjectDescription projectDescription = getProjectDescription(false);
if (projectDescription != null) {
for (ICConfigurationDescription config : projectDescription.getConfigurations()) {
CConfigurationData data = config.getConfigurationData();
@@ -274,7 +274,7 @@
}
public ICarbideBuildConfiguration getNamedConfiguration(String configName) {
- ICProjectDescription projectDescription = getProjectDescription();
+ ICProjectDescription projectDescription = getProjectDescription(false);
if (projectDescription != null) {
ICConfigurationDescription config = projectDescription.getConfigurationByName(configName);
if (config != null) {
@@ -289,7 +289,7 @@
}
public ICarbideBuildConfiguration getDefaultConfiguration() {
- ICProjectDescription projectDescription = getProjectDescription();
+ ICProjectDescription projectDescription = getProjectDescription(false);
if (projectDescription == null)
return null;
ICConfigurationDescription config = projectDescription.getActiveConfiguration();
@@ -412,8 +412,8 @@
return workingDir;
}
- protected ICProjectDescription getProjectDescription() {
- return CoreModel.getDefault().getProjectDescription(projectTracker.getProject());
+ protected ICProjectDescription getProjectDescription(boolean writable) {
+ return CoreModel.getDefault().getProjectDescription(projectTracker.getProject(), writable);
}
public int getCleanLevel() {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Mon Aug 10 15:49:39 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Mon Aug 10 15:50:55 2009 -0500
@@ -45,7 +45,7 @@
super(projDes.getProject());
this.projDes = projDes;
- initializeDefaults(projDes);
+ initializeDefaults();
}
/*
@@ -56,7 +56,7 @@
// get the latest ICProjectDescription
super(cpi.projectTracker.getProject());
- projDes = getProjectDescription();
+ projDes = getProjectDescription(true);
projectRelativeBldInfPath = cpi.projectRelativeBldInfPath;
buildFromInf = cpi.buildFromInf;
overrideWorkspaceSettings = cpi.overrideWorkspaceSettings;
--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Mon Aug 10 15:49:39 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Mon Aug 10 15:50:55 2009 -0500
@@ -88,6 +88,7 @@
public static final int LCS_ExeTargetingRule_ExeList = 2;
public static final int LCS_ExeTargetingRule_All = 3;
public static final String LCS_ExecutableTargetingRule = PREFIX + ".LCS_ExecutableTargetingRule";
+ public static final String AttachToProcessDialog_Selection = PREFIX + ".AttachToProcessName";
// Launch Type IDs
private static final String LAUNCH_TYPE_PREFIX = "com.nokia.cdt.debug.launch."; //$NON-NLS-1$
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AttachLaunchDelegate.java Mon Aug 10 15:49:39 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AttachLaunchDelegate.java Mon Aug 10 15:50:55 2009 -0500
@@ -131,7 +131,13 @@
// Ask user to choose a process
String defaultProcessName = exeFile.getPath().removeFileExtension().lastSegment();
- OSProcess attachTarget = chooseProcessTarget(processesOnTarget, defaultProcessName);
+ OSProcess attachTarget = null;
+ String choosenProcessTarget = config.getAttribute(SettingsData.AttachToProcessDialog_Selection, "");
+ if (!choosenProcessTarget.contentEquals("")) {
+ attachTarget = chooseProcessTargetNoUI(processesOnTarget, choosenProcessTarget);
+ } else {
+ attachTarget = chooseProcessTarget(processesOnTarget, defaultProcessName);
+ }
if (attachTarget == null) {
this.cancel(LaunchMessages.getString("LocalAttachLaunchDelegate.No_Process_ID_selected"), 0); //$NON-NLS-1$
@@ -195,4 +201,17 @@
return attachTarget;
}
+
+ private OSProcess chooseProcessTargetNoUI(final OSProcess[] processesOnTarget, final String choosenProcessName) {
+ attachTarget = null;
+
+ for (OSProcess process : processesOnTarget) {
+ if (process.getName().contains(choosenProcessName)) {
+ attachTarget = process;
+ break;
+ }
+ }
+
+ return attachTarget;
+ }
}