1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-11-18 04:34:29 +00:00
parent 6ae45784a5
commit 6f0c54eb86

View file

@ -139,18 +139,14 @@ public class PDOMIndexerJob extends Job {
time += System.currentTimeMillis(); time += System.currentTimeMillis();
System.out.println("Indexer: completed " + name + "[" + time + "ms]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ System.out.println("Indexer: completed " + name + "[" + time + "ms]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} }
} } catch (InterruptedException e) {
catch (InterruptedException e) {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} } catch (OperationCanceledException e) {
catch (OperationCanceledException e) {
} }
} }
} } while (currentTask != null);
while (currentTask != null);
return Status.OK_STATUS; return Status.OK_STATUS;
} } catch (RuntimeException e) {
catch (RuntimeException e) {
CCorePlugin.log(e); CCorePlugin.log(e);
pdomManager.cancelledIndexerJob(true); pdomManager.cancelledIndexerJob(true);
synchronized (taskMutex) { synchronized (taskMutex) {
@ -158,8 +154,7 @@ public class PDOMIndexerJob extends Job {
taskMutex.notifyAll(); taskMutex.notifyAll();
} }
throw e; throw e;
} } catch (Error e) {
catch (Error e) {
CCorePlugin.log(e); CCorePlugin.log(e);
pdomManager.cancelledIndexerJob(true); pdomManager.cancelledIndexerJob(true);
synchronized (taskMutex) { synchronized (taskMutex) {
@ -167,8 +162,7 @@ public class PDOMIndexerJob extends Job {
taskMutex.notifyAll(); taskMutex.notifyAll();
} }
throw e; throw e;
} } finally {
finally {
synchronized (this) { synchronized (this) {
fMonitor= null; fMonitor= null;
} }
@ -185,8 +179,7 @@ public class PDOMIndexerJob extends Job {
public void cancelJobs(IPDOMIndexer indexer, boolean waitUntilCancelled) { public void cancelJobs(IPDOMIndexer indexer, boolean waitUntilCancelled) {
synchronized (taskMutex) { synchronized (taskMutex) {
if (currentTask != null && if (currentTask != null && (indexer == null || currentTask.getIndexer() == indexer)) {
(indexer == null || currentTask.getIndexer() == indexer)) {
synchronized (this) { synchronized (this) {
if (fMonitor != null) { if (fMonitor != null) {
fMonitor.setCanceled(true); fMonitor.setCanceled(true);