Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2009-03-19 06:29:46 -0400
committerAnton Leherbauer2009-03-19 06:29:46 -0400
commit834e11a8a000626102b1d502042f821b7ca69a32 (patch)
tree1ac227cbbc48742614f71d3ac007b8819c545003
parent74ddb785af7ccc5b0c3cf1b3f4cacebe485247fb (diff)
downloadorg.eclipse.cdt-834e11a8a000626102b1d502042f821b7ca69a32.tar.gz
org.eclipse.cdt-834e11a8a000626102b1d502042f821b7ca69a32.tar.xz
org.eclipse.cdt-834e11a8a000626102b1d502042f821b7ca69a32.zip
Reduce scope of monitor, related to bug 228236 (copied from HEAD)v200903191301
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java48
1 files changed, 24 insertions, 24 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
index acc4b13ab6a..c66a3c69b67 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
@@ -450,33 +450,33 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
monitor = new NullProgressMonitor();
}
monitor.beginTask(MakeMessages.getString("ScannerInfoCollector.Processing"), 100); //$NON-NLS-1$
-// removeUnusedCommands();
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Processing")); //$NON-NLS-1$
+ ArrayList<IResource> changedResources = null;
synchronized (fLock) {
- if (scannerInfoChanged()) {
- applyFileDeltas();
- removeUnusedCommands();
- monitor.worked(50);
- monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + project.getName()); //$NON-NLS-1$
- try {
- // update scanner configuration
- // MakeCorePlugin.getDefault().getDiscoveryManager().
- // updateDiscoveredInfo(createPathInfoObject(), siChangedForFileList);
- IDiscoveredPathInfo pathInfo = MakeCorePlugin.getDefault().getDiscoveryManager().getDiscoveredInfo(project, context);
- if (!(pathInfo instanceof IPerFileDiscoveredPathInfo)) {
- pathInfo = createPathInfoObject();
- }
- MakeCorePlugin.getDefault().getDiscoveryManager().
- updateDiscoveredInfo(context, pathInfo, context.isDefaultContext(), new ArrayList<IResource>(siChangedForFileMap.keySet()));
- monitor.worked(50);
- } catch (CoreException e) {
- MakeCorePlugin.log(e);
- }
+ if (scannerInfoChanged()) {
+ applyFileDeltas();
+ removeUnusedCommands();
+ changedResources = new ArrayList<IResource>(siChangedForFileMap.keySet());
+ siChangedForFileMap.clear();
+ }
+ siChangedForCommandIdList.clear();
+ }
+ monitor.worked(50);
+ if (changedResources != null) {
+ // update outside monitor scope
+ try {
+ // update scanner configuration
+ monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + project.getName()); //$NON-NLS-1$
+ IDiscoveredPathInfo pathInfo = MakeCorePlugin.getDefault().getDiscoveryManager().getDiscoveredInfo(project, context);
+ if (!(pathInfo instanceof IPerFileDiscoveredPathInfo)) {
+ pathInfo = createPathInfoObject();
+ }
+ MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(context, pathInfo, context.isDefaultContext(), changedResources);
+ } catch (CoreException e) {
+ MakeCorePlugin.log(e);
}
- // siChangedForFileList.clear();
- siChangedForFileMap.clear();
- siChangedForCommandIdList.clear();
- }
+ }
+ monitor.worked(50);
monitor.done();
}

Back to the top