Apple patch to prevent exe list refresh on import if nothing changed.
--- a/cdt/cdt_5_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java Sat Apr 25 12:47:00 2009 -0500
+++ b/cdt/cdt_5_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java Wed May 27 15:07:28 2009 -0500
@@ -40,16 +40,16 @@
*/
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) {
@@ -190,6 +190,7 @@
}
public void importExecutables(final String[] fileNames, IProgressMonitor monitor) {
+ boolean handled = false;
try {
tempDisableRefresh = true;
@@ -208,7 +209,7 @@
}});
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;
}
@@ -219,7 +220,8 @@
tempDisableRefresh = false;
}
- refreshExecutables(monitor);
+ if (handled)
+ refreshExecutables(monitor);
monitor.done();
}
--- a/cdt/cdt_5_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/StandardExecutableImporter.java Sat Apr 25 12:47:00 2009 -0500
+++ b/cdt/cdt_5_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/StandardExecutableImporter.java Wed May 27 15:07:28 2009 -0500
@@ -60,6 +60,7 @@
IProject exeProject = null;
boolean checkProject = false;
+ boolean handled = false;
// Weed out existing ones
for (String path : fileNames) {
@@ -117,6 +118,7 @@
}
importExecutable(exeProject, path);
+ handled = true;
}
monitor.worked(1);
if (monitor.isCanceled()) {
@@ -124,7 +126,7 @@
}
}
monitor.done();
- return true;
+ return handled;
}
public boolean AllowImport(IPath path) {