Refine search
private void worked(int work) { if (this.monitor != null) { if (this.monitor.isCanceled()) throw new OperationCanceledException(); this.monitor.worked(work); } } }
/** * Check whether the build has been canceled. */ public void checkCancel() { if (this.monitor != null && this.monitor.isCanceled()) throw new OperationCanceledException(); }
private void addUpdates(TextChangeManager changeManager, IProgressMonitor pm, RefactoringStatus status) throws CoreException { pm.beginTask("", fCus.length); //$NON-NLS-1$ for (int i= 0; i < fCus.length; i++){ if (pm.isCanceled()) throw new OperationCanceledException(); addUpdates(changeManager, fCus[i], new SubProgressMonitor(pm, 1), status); } }
private void performOperation(IFileBuffer[] fileBuffers, IFileBufferOperation operation, IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException { for (int i= 0; i < fileBuffers.length; i++) { if (progressMonitor.isCanceled()) throw new OperationCanceledException(); IProgressMonitor subMonitor= Progress.getSubMonitor(progressMonitor, 100); performOperation(fileBuffers[i], operation, subMonitor); subMonitor.done(); } }
/** * Acquire a write lock on this {@link Nd}. Blocks until any existing read/write locks are released. * @throws OperationCanceledException * @throws IllegalStateException if this {@link Nd} is not writable */ public void acquireWriteLock(IProgressMonitor monitor) { try { acquireWriteLock(0, monitor); } catch (InterruptedException e) { throw new OperationCanceledException(); } }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; } }
public void checkForCancellation() { if (root.isCanceled()) { throw new OperationCanceledException(); } } }
private void addUpdates(TextChangeManager changeManager, IProgressMonitor pm, RefactoringStatus status) throws CoreException { pm.beginTask("", fCus.length); //$NON-NLS-1$ for (int i= 0; i < fCus.length; i++){ if (pm.isCanceled()) { throw new OperationCanceledException(); } addUpdates(changeManager, fCus[i], new SubProgressMonitor(pm, 1), status); } }
private boolean queryReplace(IProject project) throws OperationCanceledException { switch (fReplaceQuery.doQuery(project)) { case IReplaceQuery.CANCEL : throw new OperationCanceledException(); case IReplaceQuery.NO : return false; } return true; }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { JavaCore.run(fWorkspaceRunnable, fRule, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } }
protected void worked(IProgressMonitor monitor, int work) { if (monitor != null) { if (monitor.isCanceled()) { throw new OperationCanceledException(); } else { monitor.worked(work); } } } /**
/** * Check whether the build has been canceled. */ public void checkCancel() { if (this.monitor != null && this.monitor.isCanceled()) throw new OperationCanceledException(); }
private void addUpdates(TextChangeManager changeManager, IProgressMonitor pm, RefactoringStatus status) throws CoreException { pm.beginTask("", fCus.length); //$NON-NLS-1$ for (int i= 0; i < fCus.length; i++){ if (pm.isCanceled()) throw new OperationCanceledException(); addUpdates(changeManager, fCus[i], new SubProgressMonitor(pm, 1), status); } }
/** * Acquire a write lock on this {@link Nd}. Blocks until any existing read/write locks are released. * @throws OperationCanceledException * @throws IllegalStateException if this {@link Nd} is not writable */ public void acquireWriteLock(IProgressMonitor monitor) { try { acquireWriteLock(0, monitor); } catch (InterruptedException e) { throw new OperationCanceledException(); } }
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { JavaCore.run(fWorkspaceRunnable, fRule, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } }
@Override protected void childRegionUpdated() { if (fProgressMonitor.isCanceled()) throw new OperationCanceledException(); fProgressMonitor.worked(1); } }
protected void checkCanceled() { if (monitor.isCanceled()) { throw new OperationCanceledException(); } }
public static void waitForBuild(IProgressMonitor monitor) { try { ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor); } catch (CoreException e) { throw new OperationCanceledException(e.getMessage()); } }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { ResourcesPlugin.getWorkspace().run(workspaceRunnable, rule, IWorkspace.AVOID_UPDATE, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } } }
protected void worked(IProgressMonitor monitor, int work) { if (monitor != null) { if (monitor.isCanceled()) { throw new OperationCanceledException(); } else { monitor.worked(work); } } } /**