mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +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 {
|
try {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
|
||||||
if (delta != null)
|
String taskName = null;
|
||||||
|
if (delta != null) {
|
||||||
processDelta(delta);
|
processDelta(delta);
|
||||||
if (project != null)
|
taskName = "Update PDOM";
|
||||||
|
}
|
||||||
|
if (project != null) {
|
||||||
processNewProject(project);
|
processNewProject(project);
|
||||||
|
taskName = "Rebuild PDOM";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (taskName == null)
|
||||||
|
return Status.OK_STATUS;
|
||||||
|
|
||||||
|
monitor.beginTask(taskName, count);
|
||||||
|
|
||||||
if (addedTUs != null)
|
if (addedTUs != null)
|
||||||
for (Iterator i = addedTUs.iterator(); i.hasNext();) {
|
for (Iterator i = addedTUs.iterator(); i.hasNext();) {
|
||||||
if (monitor.isCanceled())
|
if (monitor.isCanceled())
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
monitor.subTask("Files remaining: " + (count--));
|
|
||||||
ITranslationUnit tu = (ITranslationUnit)i.next();
|
ITranslationUnit tu = (ITranslationUnit)i.next();
|
||||||
|
monitor.subTask(String.valueOf(count--)
|
||||||
|
+" files remaining - "
|
||||||
|
+ tu.getElementName());
|
||||||
processAddedTU(tu);
|
processAddedTU(tu);
|
||||||
|
monitor.worked(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changedTUs != null)
|
if (changedTUs != null)
|
||||||
for (Iterator i = changedTUs.iterator(); i.hasNext();) {
|
for (Iterator i = changedTUs.iterator(); i.hasNext();) {
|
||||||
if (monitor.isCanceled())
|
if (monitor.isCanceled())
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
monitor.subTask("Files remaining: " + (count--));
|
|
||||||
ITranslationUnit tu = (ITranslationUnit)i.next();
|
ITranslationUnit tu = (ITranslationUnit)i.next();
|
||||||
|
monitor.subTask(String.valueOf(count--)
|
||||||
|
+" files remaining - "
|
||||||
|
+ tu.getElementName());
|
||||||
processChangedTU(tu);
|
processChangedTU(tu);
|
||||||
|
monitor.worked(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removedTUs != null)
|
if (removedTUs != null)
|
||||||
for (Iterator i = removedTUs.iterator(); i.hasNext();) {
|
for (Iterator i = removedTUs.iterator(); i.hasNext();) {
|
||||||
if (monitor.isCanceled())
|
if (monitor.isCanceled())
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
monitor.subTask("Files remaining: " + (count--));
|
|
||||||
ITranslationUnit tu = (ITranslationUnit)i.next();
|
ITranslationUnit tu = (ITranslationUnit)i.next();
|
||||||
|
monitor.subTask(String.valueOf(count--)
|
||||||
|
+" files remaining - "
|
||||||
|
+ tu.getElementName());
|
||||||
processRemovedTU(tu);
|
processRemovedTU(tu);
|
||||||
|
monitor.worked(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
String showTimings = Platform.getDebugOption(CCorePlugin.PLUGIN_ID + "/debug/pdomtimings"); //$NON-NLS-1$
|
String showTimings = Platform.getDebugOption(CCorePlugin.PLUGIN_ID + "/debug/pdomtimings"); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue