IJobChangeListener
Classes that wish to listen to the progress of scheduled jobs can extend this class and override only the methods which they are interested in.
171172173174175176177178179180181
searches.put(editor, new ArrayList<Search>()); } searches.get(editor).add(search); // This listener ensures that only one search can be // performed at the same time for an editor search.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { if (event.getResult().isOK()) { logger.debug("Search completed successfully."); search.getSearchResult().notifyObservers(
340341342343344345346347348349350
if (selectedFiles != null) { final AnalyseBundleResolutionJob tmp = new AnalyseBundleResolutionJob("importExportAnalysis", selectedFiles); tmp.setSystem(true); tmp.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { IStatus result = tmp.getResult(); if (result != null && result.isOK()) { if (display != null && !display.isDisposed())
289290291292293294295296297298299
*/ public void stopRendering() { if (renderJob.cancel()) return; final AtomicBoolean done = new AtomicBoolean(renderJob.cancel()); IJobChangeListener listener = new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { done.set(true); synchronized (done) { done.notify();
4849505152535455565758
*/ protected void createListener() { if (listener != null) return; listener = new JobChangeAdapter() { public void done(IJobChangeEvent event) { jobDone(event.getResult()); } };
246247248249250251252253254255256
private void makeActions() { action1 = new Action() { public void run() { Job job = new XMLJob(currentFile.getProject()); job.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { Display.getDefault().asyncExec(new Runnable() { public void run() { //viewer.refresh(); //viewer.expandToLevel(2);
4344454647484950515253
if (debug) { final CheckLaunchJob checkLaunchJob = new CheckLaunchJob( "Checking server for " + javaGaeProject.getElementName(), javaGaeProject, shouldOpenBrowser()); checkLaunchJob.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { if (event.getResult().isOK()) { Display.getDefault().asyncExec(new Runnable() {
585586587588589590591592593594595
private void refreshLog(IJavaProject javaGaeProject) { final FetchLogsJob fetchLogsJob = new FetchLogsJob(javaGaeProject, "Fetch logs", days, LogSeverity.values()[STRINGS.length-1-minSeverityToFetch]); fetchLogsJob.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { if (event.getResult().isOK()) { Display.getDefault().asyncExec(new Runnable() {
2930313233343536373839
if (!com.onpositive.gae.tools.license.LicenseChecker.checkLicense(isDebug())){ return; } final TakeSnapshot takeSnapshot = new TakeSnapshot( "Capturing current performance data",isDebug()); takeSnapshot.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { if (event.getResult().isOK()){ Display.getDefault().asyncExec(new CaptureSnapshot(takeSnapshot)); }
392393394395396397398399400401402
}; refreshJob.setSystem(true); refreshJob.setRule(ResourcesPlugin.getWorkspace().getRoot()); if (runAfter != null) { refreshJob.addJobChangeListener(new JobChangeAdapter() { @Override public void done(final IJobChangeEvent event) { runAfter.run();
3839404142434445464748
"Preparing Google Web Application Project", fJavaProject, Activator.getDefault().getBundle(), true); PlatformUI.getWorkbench().getProgressService() .showInDialog(null, prepareGaeProject); prepareGaeProject.schedule(); prepareGaeProject.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { if (event.getResult().isOK()) { Display.getDefault().asyncExec(new Runnable() {