Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorKen Ryall2007-09-07 23:35:27 +0000
committerKen Ryall2007-09-07 23:35:27 +0000
commitf1dcaf70a2a8b535d635be1cc658858232d521ea (patch)
treea070e2303416c2f007333b348b8c1b7b31d11054 /debug
parentaca075d50b493de7850f6b61770da4ff80dac6b8 (diff)
downloadorg.eclipse.cdt-f1dcaf70a2a8b535d635be1cc658858232d521ea.tar.gz
org.eclipse.cdt-f1dcaf70a2a8b535d635be1cc658858232d521ea.tar.xz
org.eclipse.cdt-f1dcaf70a2a8b535d635be1cc658858232d521ea.zip
Fixed a problem where binary parsers where sometimes not saved in the project.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java44
1 files changed, 6 insertions, 38 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java
index 12211708a67..580404ece1b 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java
@@ -13,9 +13,8 @@ package org.eclipse.cdt.debug.ui.importexecutable;
import java.io.File;
import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.ICDescriptor;
-import org.eclipse.cdt.core.ICDescriptorOperation;
import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.core.resources.IFile;
@@ -28,11 +27,10 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobManager;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.ui.DebugUITools;
@@ -60,44 +58,14 @@ public abstract class AbstractImportExecutableWizard extends Wizard implements I
protected ImportExecutablePageTwo pageTwo;
- private String parserID;
-
-
- private void waitForJob(String name)
- {
- IJobManager jobMan = Job.getJobManager();
- Job[] jobs = jobMan.find(null);
-
- for (int i = 0; i < jobs.length; i++) {
- if (jobs[i].getName().equals(name)) {
- try {
- jobs[i].join();
- } catch (InterruptedException e) {
- }
- }
- }
- }
-
- private void waitForDescSave() {
- String taskName = CCorePlugin.getResourceString("CDescriptorManager.async_updater"); //$NON-NLS-1$
- waitForJob(taskName);
- }
-
public void addBinaryParsers(IProject newProject) throws CoreException {
- ICDescriptorOperation op = new ICDescriptorOperation() {
-
- public void execute(ICDescriptor descriptor, IProgressMonitor monitor) throws CoreException {
- descriptor.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, parserID);
- }
- };
-
+ ICProjectDescription pd = CCorePlugin.getDefault().getProjectDescription(newProject);
String[] parserIDs = pageOne.getSupportedBinaryParserIds();
for (int i = 0; i < parserIDs.length; i++) {
- parserID = parserIDs[i];
- CCorePlugin.getDefault().getCDescriptorManager().runDescriptorOperation(newProject.getProject(), op, null);
- waitForDescSave();
- }
+ pd.getDefaultSettingConfiguration().create(CCorePlugin.BINARY_PARSER_UNIQ_ID, parserIDs[i]);
}
+ CCorePlugin.getDefault().setProjectDescription(newProject, pd, true, new NullProgressMonitor());
+ }
/**
* Adds the executables to a new or existing project. The executables are

Back to the top