public final void join() throws InterruptedException { if (m_job != null) { m_job.join(); } }
public void run() { try { pingJob.join(); } catch (InterruptedException e) { } } });
public void run() { try { pingJob.join(); } catch (InterruptedException e) { } } });
public void run() { try { pingJob.join(); } catch (InterruptedException e) { } } });
public void delete() { synchronized (this.queueMutex) { this.pendingWrite = null; } this.writeJob.cancel(); try { this.writeJob.join(); } catch (InterruptedException e) { // Nothing to do } synchronized (this.queueMutex) { this.pendingWrite = null; } this.savedIndexNamesFile.delete(); } }
public void delete() { synchronized (this.queueMutex) { this.pendingWrite = null; } this.writeJob.cancel(); try { this.writeJob.join(); } catch (InterruptedException e) { // Nothing to do } synchronized (this.queueMutex) { this.pendingWrite = null; } this.savedIndexNamesFile.delete(); } }
public IType getAccessorType() { if (fJob != null) { try { fJob.join(); } catch (InterruptedException e) { JavaPlugin.log(e); } } return fAccessorTypes.get(getEditorInput()); }
public IType getAccessorType() { if (fJob != null) { try { fJob.join(); } catch (InterruptedException e) { JavaPlugin.log(e); } } return fAccessorTypes.get(getEditorInput()); }
/** Waits for all the jobs to finish. */ public static void waitForJobsToFinish() { EclipseMisc.withService(IJobManager.class, jobManager -> { Job job; while ((job = jobManager.currentJob()) != null) { System.out.print(" waiting for " + job.getName() + " to finish... "); job.join(); System.out.println("complete."); } }); } }
public void waitForIndex(IProgressMonitor monitor) { try { boolean shouldRescan = false; synchronized (this.automaticIndexingMutex) { if (!this.enableAutomaticIndexing && this.indexerDirtiedWhileDisabled) { shouldRescan = true; } } if (shouldRescan) { this.rescanJob.schedule(); } this.rescanJob.join(0, monitor); } catch (InterruptedException e) { throw new OperationCanceledException(); } }
public void waitForIndex(IProgressMonitor monitor) { try { boolean shouldRescan = false; synchronized (this.automaticIndexingMutex) { if (!this.enableAutomaticIndexing && this.indexerDirtiedWhileDisabled) { shouldRescan = true; } } if (shouldRescan) { this.rescanJob.schedule(); } this.rescanJob.join(0, monitor); } catch (InterruptedException e) { throw new OperationCanceledException(); } }
Job job = new WorkspaceJob("name") { @Override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { return Status.OK_STATUS; } }; job.schedule(); try { job.join(); } catch (InterruptedException e) { // }
public void dispose() { Job disconnectJob = new DisconnectJob(true); disconnectJob.schedule(); try { disconnectJob.join(); } catch (InterruptedException e) { } mPropertySetListeners.clear(); mConnectListeners.clear(); for (Iterator it = mFactoryIDToManagedConnection.values() .iterator(); it.hasNext();) { ManagedConnection managedConnection = (ManagedConnection) it .next(); managedConnection.dispose(); } mFactoryIDToManagedConnection.clear(); }
public IStatus saveWorkOfflineData() { Job saveWorkOfflineDataJob = new SaveWorkOfflineDataJob(); saveWorkOfflineDataJob.schedule(); try { saveWorkOfflineDataJob.join(); } catch (InterruptedException e) { } return saveWorkOfflineDataJob.getResult(); }
@Override protected IStatus run(IProgressMonitor monitor) { if (oldJob != null) { try { oldJob.join(); } catch (InterruptedException e) { JavaPlugin.log(e); return Status.CANCEL_STATUS; } } if (monitor.isCanceled()) return Status.CANCEL_STATUS; CompilationUnit ast= SharedASTProviderCore.getAST(element, SharedASTProviderCore.WAIT_YES, monitor); reconciled(ast, false, monitor); synchronized (fJobLock) { // allow the job to be gc'ed if (fJob == this) fJob= null; } return Status.OK_STATUS; } };
@Override public void run() { Job job = new AbstractJob("update translations") { @Override protected void execute(IProgressMonitor monitor) { m_nlsProject.removeEntries(m_entries, monitor); } }; job.setUser(false); job.schedule(); try { job.join(); m_status = job.getResult(); } catch (InterruptedException e) { SdkLog.error("cold not remove the row key: {} in translation resources", m_entries, e); } }
public IStatus connect() { /* * Cancel any jobs currently associated with this profile. Specifically, * we want to make sure any RefreshProfileJobs are cancelled to prevent * deadlock in the UI thread. */ Platform.getJobManager().cancel(this); Job connectJob = new ConnectJob(); connectJob.schedule(); try { connectJob.join(); } catch (InterruptedException e) { } return connectJob.getResult(); }
public IStatus disconnect() { /* * Cancel any jobs currently associated with this profile. Specifically, * we want to make sure any RefreshProfileJobs are cancelled to prevent * deadlock in the UI thread. */ Platform.getJobManager().cancel(this); Job disconnectJob = new DisconnectJob(); disconnectJob.schedule(); try { disconnectJob.join(); } catch (InterruptedException e) { } return disconnectJob.getResult(); }
public IStatus workOffline() { /* * Cancel any jobs currently associated with this profile. Specifically, * we want to make sure any RefreshProfileJobs are cancelled to prevent * deadlock in the UI thread. */ Platform.getJobManager().cancel(this); Job workOfflineJob = new WorkOfflineJob(); workOfflineJob.schedule(); try { workOfflineJob.join(); } catch (InterruptedException e) { } return workOfflineJob.getResult(); }
public void rebuildIndex(IProgressMonitor monitor) throws CoreException { SubMonitor subMonitor = SubMonitor.convert(monitor, 100); this.rescanJob.cancel(); try { this.rescanJob.join(0, subMonitor.split(1)); } catch (InterruptedException e) { // Nothing to do. } this.nd.acquireWriteLock(subMonitor.split(1)); try { this.nd.clear(subMonitor.split(2)); this.nd.getDB().flush(); } finally { this.nd.releaseWriteLock(); } if (!JavaIndex.isEnabled()) { return; } rescan(subMonitor.split(97)); }