mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
Reduce scope of monitor, related to bug 228236
This commit is contained in:
parent
a2fa29fcd3
commit
a051216624
1 changed files with 24 additions and 24 deletions
|
@ -450,33 +450,33 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
|
||||||
monitor = new NullProgressMonitor();
|
monitor = new NullProgressMonitor();
|
||||||
}
|
}
|
||||||
monitor.beginTask(MakeMessages.getString("ScannerInfoCollector.Processing"), 100); //$NON-NLS-1$
|
monitor.beginTask(MakeMessages.getString("ScannerInfoCollector.Processing"), 100); //$NON-NLS-1$
|
||||||
// removeUnusedCommands();
|
|
||||||
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Processing")); //$NON-NLS-1$
|
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Processing")); //$NON-NLS-1$
|
||||||
|
ArrayList<IResource> changedResources = null;
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
if (scannerInfoChanged()) {
|
if (scannerInfoChanged()) {
|
||||||
applyFileDeltas();
|
applyFileDeltas();
|
||||||
removeUnusedCommands();
|
removeUnusedCommands();
|
||||||
monitor.worked(50);
|
changedResources = new ArrayList<IResource>(siChangedForFileMap.keySet());
|
||||||
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + project.getName()); //$NON-NLS-1$
|
siChangedForFileMap.clear();
|
||||||
try {
|
}
|
||||||
// update scanner configuration
|
siChangedForCommandIdList.clear();
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// siChangedForFileList.clear();
|
|
||||||
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
monitor.worked(50);
|
||||||
monitor.done();
|
monitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue