Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorKen Ryall2009-05-26 14:24:30 -0400
committerKen Ryall2009-05-26 14:24:30 -0400
commit37c2a407da1f70b02bbb8d44fdf768312fdab7f1 (patch)
treefc69ce393359571fed8c2a5aba2735c7e300e4e0 /debug
parent053ba2bfc40707e2452cc37edeaeb41808082892 (diff)
downloadorg.eclipse.cdt-37c2a407da1f70b02bbb8d44fdf768312fdab7f1.tar.gz
org.eclipse.cdt-37c2a407da1f70b02bbb8d44fdf768312fdab7f1.tar.xz
org.eclipse.cdt-37c2a407da1f70b02bbb8d44fdf768312fdab7f1.zip
Bug 277903, don't refresh exe list if import doesn't add and new ones.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java20
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java4
2 files changed, 14 insertions, 10 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java
index 63886cd847..3268ab453e 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java
@@ -45,16 +45,16 @@ import org.eclipse.debug.core.DebugPlugin;
*/
public class ExecutablesManager extends PlatformObject {
- private HashMap<String, Executable> executables = new HashMap<String, Executable>();
- private List<IExecutablesChangeListener> changeListeners = Collections.synchronizedList(new ArrayList<IExecutablesChangeListener>());
- private List<ISourceFileRemapping> sourceFileRemappings = Collections.synchronizedList(new ArrayList<ISourceFileRemapping>());
- private List<IExecutableProvider> executableProviders = Collections.synchronizedList(new ArrayList<IExecutableProvider>());
- private List<ISourceFilesProvider> sourceFileProviders = Collections.synchronizedList(new ArrayList<ISourceFilesProvider>());
- private List<IExecutableImporter> executableImporters = Collections.synchronizedList(new ArrayList<IExecutableImporter>());
+ private final HashMap<String, Executable> executables = new HashMap<String, Executable>();
+ private final List<IExecutablesChangeListener> changeListeners = Collections.synchronizedList(new ArrayList<IExecutablesChangeListener>());
+ private final List<ISourceFileRemapping> sourceFileRemappings = Collections.synchronizedList(new ArrayList<ISourceFileRemapping>());
+ private final List<IExecutableProvider> executableProviders = Collections.synchronizedList(new ArrayList<IExecutableProvider>());
+ private final List<ISourceFilesProvider> sourceFileProviders = Collections.synchronizedList(new ArrayList<ISourceFilesProvider>());
+ private final List<IExecutableImporter> executableImporters = Collections.synchronizedList(new ArrayList<IExecutableImporter>());
private boolean refreshNeeded = true;
private boolean tempDisableRefresh = false;
- private Job refreshJob = new Job("Get Executables") {
+ private final Job refreshJob = new Job("Get Executables") {
@Override
public IStatus run(IProgressMonitor monitor) {
@@ -204,6 +204,7 @@ public class ExecutablesManager extends PlatformObject {
}
public void importExecutables(final String[] fileNames, IProgressMonitor monitor) {
+ boolean handled = false;
try {
tempDisableRefresh = true;
@@ -222,7 +223,7 @@ public class ExecutablesManager extends PlatformObject {
}});
for (IExecutableImporter importer : executableImporters) {
- boolean handled = importer.importExecutables(fileNames, new SubProgressMonitor(monitor, 1));
+ handled = importer.importExecutables(fileNames, new SubProgressMonitor(monitor, 1));
if (handled || monitor.isCanceled()) {
break;
}
@@ -233,7 +234,8 @@ public class ExecutablesManager extends PlatformObject {
tempDisableRefresh = false;
}
- refreshExecutables(monitor);
+ if (handled)
+ refreshExecutables(monitor);
monitor.done();
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java
index 3492dc6c8a..063c7da62f 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java
@@ -63,6 +63,7 @@ public class StandardExecutableImporter implements IExecutableImporter {
IProject exeProject = null;
boolean checkProject = false;
+ boolean handled = false;
// Weed out existing ones
for (String path : fileNames) {
@@ -120,6 +121,7 @@ public class StandardExecutableImporter implements IExecutableImporter {
}
importExecutable(exeProject, path);
+ handled = true;
}
monitor.worked(1);
if (monitor.isCanceled()) {
@@ -127,7 +129,7 @@ public class StandardExecutableImporter implements IExecutableImporter {
}
}
monitor.done();
- return true;
+ return handled;
}
public boolean AllowImport(IPath path) {

Back to the top