/* (non-Javadoc)
  * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#dispose()
  */
 public synchronized void dispose() {
   Iterator iterator = fSourceContainerMap.values().iterator();
   while (iterator.hasNext()) {
     ISourceContainer[] containers = (ISourceContainer[]) iterator.next();
     for (int i = 0; i < containers.length; i++) {
       containers[i].dispose();
     }
   }
   fSourceContainerMap.clear();
   super.dispose();
 }
Beispiel #2
0
 /**
  * Run the given runnable, waiting until the end to perform a refresh
  *
  * @param runnable
  * @param monitor
  */
 public void run(IRunnableWithProgress runnable, IProgressMonitor monitor)
     throws InvocationTargetException, InterruptedException {
   try {
     notificationLevel++;
     runnable.run(monitor);
   } finally {
     notificationLevel = Math.max(0, notificationLevel - 1);
     if (notificationLevel == 0) {
       try {
         Collection roots = changedRepositories.values();
         broadcastRepositoriesChanged(
             (ICVSRepositoryLocation[]) roots.toArray(new ICVSRepositoryLocation[roots.size()]));
       } finally {
         changedRepositories.clear();
       }
     }
   }
 }
Beispiel #3
0
  void perform(
      MultiStatus status, EngineSession session, Operand[] operands, IProgressMonitor monitor) {
    SubMonitor subMonitor =
        SubMonitor.convert(monitor, prePerformWork + mainPerformWork + postPerformWork);
    session.recordPhaseEnter(this);
    prePerform(status, session, subMonitor.newChild(prePerformWork));
    if (status.matches(IStatus.ERROR | IStatus.CANCEL)) return;
    session.recordPhaseStart(this);

    subMonitor.setWorkRemaining(mainPerformWork + postPerformWork);
    mainPerform(status, session, operands, subMonitor.newChild(mainPerformWork));
    if (status.matches(IStatus.ERROR | IStatus.CANCEL)) return;

    session.recordPhaseEnd(this);
    subMonitor.setWorkRemaining(postPerformWork);
    postPerform(status, session, subMonitor.newChild(postPerformWork));
    phaseParameters.clear();
    if (status.matches(IStatus.ERROR | IStatus.CANCEL)) return;
    session.recordPhaseExit(this);
    subMonitor.done();
  }
 public void clear() {
   mRulesMap.clear();
 }
 public void removeAll(IProgressMonitor monitor) {
   artifactDescriptors.clear();
   keysToLocations.clear();
   locationsToContents.clear();
 }