protected void deleteMarkers(final IMarker[] markers) throws CoreException { fWorkspace.run(new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { for (int i= 0; i < markers.length; ++i) { markers[i].delete(); } } }, null, IWorkspace.AVOID_UPDATE, null); }
@Override protected void deleteMarkers(final IMarker[] markers) throws CoreException { fWorkspace.run(new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { for (int i= 0; i < markers.length; ++i) { markers[i].delete(); } } }, null, IWorkspace.AVOID_UPDATE, null); }
/** * Default implementation of <code>run</code> that invokes the * corresponding <code>run</code> on {@link org.eclipse.core.resources.IWorkspace}. * @see org.eclipse.team.core.mapping.IMergeContext#run(org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.jobs.ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor) */ @Override public void run(IWorkspaceRunnable runnable, ISchedulingRule rule, int flags, IProgressMonitor monitor) throws CoreException { ResourcesPlugin.getWorkspace().run(runnable, rule, flags, monitor); }
public void run(IProgressMonitor monitor) throws InvocationTargetException { try { ResourcesPlugin.getWorkspace().run(workspaceRunnable, monitor); } catch (CoreException e) { throw new InvocationTargetException(e); } } }
public void didClose(DidCloseTextDocumentParams params) { try { ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { handleClosed(params); } }, new NullProgressMonitor()); } catch (CoreException e) { JavaLanguageServerPlugin.logException("Handle document close ", e); } }
public void didChange(DidChangeTextDocumentParams params) { try { ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { handleChanged(params); } }, new NullProgressMonitor()); } catch (CoreException e) { JavaLanguageServerPlugin.logException("Handle document change ", e); } }
public void didOpen(DidOpenTextDocumentParams params) { try { ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { handleOpen(params); } }, new NullProgressMonitor()); } catch (CoreException e) { JavaLanguageServerPlugin.logException("Handle document open ", e); } }
public void didSave(DidSaveTextDocumentParams params) { try { ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { handleSaved(params); } }, new NullProgressMonitor()); } catch (CoreException e) { JavaLanguageServerPlugin.logException("Handle document save ", e); } }
protected void runSaveOperation(IWorkspaceRunnable runnable, IProgressMonitor monitor) throws SaveFailedException { try { ResourcesPlugin.getWorkspace().run(runnable, ResourcesPlugin.getWorkspace().getRoot(), IWorkspace.AVOID_UPDATE, monitor); } catch (CoreException e) { throw new SaveFailedException(e); } }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { ResourcesPlugin.getWorkspace().run(fWorkspaceRunnable, fRule, IWorkspace.AVOID_UPDATE, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } } }
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); } } }
@Override public void run(IResource root, IWorkspaceRunnable runnable, IProgressMonitor monitor) throws TeamException { try { ResourcesPlugin.getWorkspace().run(runnable, root, 0, monitor); } catch (CoreException e) { throw TeamException.asTeamException(e); } } }
protected void run(ISchedulingRule rule, IWorkspaceRunnable wr) { try { ResourcesPlugin.getWorkspace().run(wr, rule, 0, null); } catch (CoreException e) { AntUIPlugin.log(e.getStatus()); } }
@Override protected void commit(final IFileBuffer[] fileBuffers, final IProgressMonitor progressMonitor) throws CoreException { IWorkspaceRunnable runnable= new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { doCommit(fileBuffers, progressMonitor); } }; ResourcesPlugin.getWorkspace().run(runnable, computeCommitRule(fileBuffers), IWorkspace.AVOID_UPDATE, progressMonitor); } }
@Override public ResourceTraversal[] refresh(final ResourceMapping[] mappings, IProgressMonitor monitor) throws CoreException { final List<ResourceTraversal[]> result = new ArrayList<>(1); ResourcesPlugin.getWorkspace().run((IWorkspaceRunnable) monitor1 -> { result.add(SubscriberScopeManager.super.refresh(mappings, monitor1)); hookupParticipants(); }, getSchedulingRule(), IResource.NONE, monitor); if (result.isEmpty()) return new ResourceTraversal[0]; return result.get(0); }
@Override public void initialize( IProgressMonitor monitor) throws CoreException { ResourcesPlugin.getWorkspace().run((IWorkspaceRunnable) monitor1 -> internalPrepareContext(monitor1), getSchedulingRule(), IResource.NONE, monitor); }
@Override protected IStatus run(IProgressMonitor monitor) { try { PDEPlugin.getWorkspace().run(op, monitor); } catch (CoreException e) { PDEPlugin.logException(e); return Status.CANCEL_STATUS; } return Status.OK_STATUS; } };
@Override public void run(ToolingApiOperation runnable, CancellationTokenSource tokenSource, IProgressMonitor monitor) throws CoreException { IProgressMonitor efficientMonitor = new RateLimitingProgressMonitor(monitor, 500, TimeUnit.MILLISECONDS); ResourcesPlugin.getWorkspace().run(new WorkspaceRunnableAdapter(runnable, tokenSource), runnable.getRule(), 0, efficientMonitor); }
protected void refreshFiles(List someFiles, List inconsitentResources) throws CoreException { RefreshRunnable runnable = new RefreshRunnable(someFiles, inconsitentResources); ResourcesPlugin.getWorkspace().run(runnable, null); if (runnable.getThrownException() != null) throw runnable.getThrownException(); }
@Override public void initialize(IProgressMonitor monitor) throws CoreException { ResourcesPlugin.getWorkspace().run((IWorkspaceRunnable) monitor1 -> { SubscriberScopeManager.super.initialize(monitor1); hookupParticipants(); getSubscriber().addListener(SubscriberScopeManager.this); }, getSchedulingRule(), IResource.NONE, monitor); }