mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Better messages for PDOMUpdator progress.
This commit is contained in:
parent
8c0214ebfd
commit
ae61676266
1 changed files with 25 additions and 6 deletions
|
@ -70,37 +70,56 @@ public class PDOMUpdator extends Job {
|
|||
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
if (delta != null)
|
||||
|
||||
String taskName = null;
|
||||
if (delta != null) {
|
||||
processDelta(delta);
|
||||
if (project != null)
|
||||
taskName = "Update PDOM";
|
||||
}
|
||||
if (project != null) {
|
||||
processNewProject(project);
|
||||
taskName = "Rebuild PDOM";
|
||||
}
|
||||
|
||||
if (taskName == null)
|
||||
return Status.OK_STATUS;
|
||||
|
||||
monitor.beginTask(taskName, count);
|
||||
|
||||
if (addedTUs != null)
|
||||
for (Iterator i = addedTUs.iterator(); i.hasNext();) {
|
||||
if (monitor.isCanceled())
|
||||
return Status.CANCEL_STATUS;
|
||||
monitor.subTask("Files remaining: " + (count--));
|
||||
ITranslationUnit tu = (ITranslationUnit)i.next();
|
||||
monitor.subTask(String.valueOf(count--)
|
||||
+" files remaining - "
|
||||
+ tu.getElementName());
|
||||
processAddedTU(tu);
|
||||
monitor.worked(1);
|
||||
}
|
||||
|
||||
if (changedTUs != null)
|
||||
for (Iterator i = changedTUs.iterator(); i.hasNext();) {
|
||||
if (monitor.isCanceled())
|
||||
return Status.CANCEL_STATUS;
|
||||
monitor.subTask("Files remaining: " + (count--));
|
||||
ITranslationUnit tu = (ITranslationUnit)i.next();
|
||||
monitor.subTask(String.valueOf(count--)
|
||||
+" files remaining - "
|
||||
+ tu.getElementName());
|
||||
processChangedTU(tu);
|
||||
monitor.worked(1);
|
||||
}
|
||||
|
||||
if (removedTUs != null)
|
||||
for (Iterator i = removedTUs.iterator(); i.hasNext();) {
|
||||
if (monitor.isCanceled())
|
||||
return Status.CANCEL_STATUS;
|
||||
monitor.subTask("Files remaining: " + (count--));
|
||||
ITranslationUnit tu = (ITranslationUnit)i.next();
|
||||
monitor.subTask(String.valueOf(count--)
|
||||
+" files remaining - "
|
||||
+ tu.getElementName());
|
||||
processRemovedTU(tu);
|
||||
monitor.worked(1);
|
||||
}
|
||||
|
||||
String showTimings = Platform.getDebugOption(CCorePlugin.PLUGIN_ID + "/debug/pdomtimings"); //$NON-NLS-1$
|
||||
|
|
Loading…
Add table
Reference in a new issue