mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Added cancel for Fast Reindexing jobs.
This commit is contained in:
parent
1be823b03c
commit
fed6506282
1 changed files with 6 additions and 0 deletions
|
@ -44,6 +44,8 @@ public class PDOMFastReindex extends PDOMFastIndexerJob {
|
|||
final int[] count = { 0 };
|
||||
pdom.getProject().accept(new ICElementVisitor() {
|
||||
public boolean visit(ICElement element) throws CoreException {
|
||||
if (monitor.isCanceled())
|
||||
throw new CoreException(Status.CANCEL_STATUS);
|
||||
switch (element.getElementType()) {
|
||||
case ICElement.C_UNIT:
|
||||
++count[0];
|
||||
|
@ -61,6 +63,8 @@ public class PDOMFastReindex extends PDOMFastIndexerJob {
|
|||
// First index all the source files (i.e. not headers)
|
||||
pdom.getProject().accept(new ICElementVisitor() {
|
||||
public boolean visit(ICElement element) throws CoreException {
|
||||
if (monitor.isCanceled())
|
||||
throw new CoreException(Status.CANCEL_STATUS);
|
||||
switch (element.getElementType()) {
|
||||
case ICElement.C_UNIT:
|
||||
ITranslationUnit tu = (ITranslationUnit)element;
|
||||
|
@ -85,6 +89,8 @@ public class PDOMFastReindex extends PDOMFastIndexerJob {
|
|||
// Now add in the header files but only if they aren't already indexed
|
||||
pdom.getProject().accept(new ICElementVisitor() {
|
||||
public boolean visit(ICElement element) throws CoreException {
|
||||
if (monitor.isCanceled())
|
||||
throw new CoreException(Status.CANCEL_STATUS);
|
||||
switch (element.getElementType()) {
|
||||
case ICElement.C_UNIT:
|
||||
ITranslationUnit tu = (ITranslationUnit)element;
|
||||
|
|
Loading…
Add table
Reference in a new issue