/** * Cancels the early startup job, if it's still running. */ private void cancelEarlyStartup() { Job.getJobManager().cancel(EARLY_STARTUP_FAMILY); // We do not currently wait for any plug-in currently being started to // complete // (e.g. by doing a join on EARLY_STARTUP_FAMILY), since they may do a // syncExec, // which would hang. See bug 94537 for rationale. }
public void stop(BundleContext context) throws Exception { plugin = null; // Make sure we cancel indexer if it is currently running Job.getJobManager().cancel(IndexerJob.FAMILY); super.stop(context); }
/** * Cancel all jobs that are fetching content for the given parent or any of * its children. * * @param parent */ public void cancel(Object parent) { if (parent == null) { return; } Job.getJobManager().cancel(new DeferredContentFamily(this, parent)); }
public void stop(BundleContext bundleContext) throws Exception { try { // cancel any repository load jobs started in the UI Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY); // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=305163 // join the jobs so that this bundle does not stop until the jobs are // actually cancelled. Job.getJobManager().join(LoadMetadataRepositoryJob.LOAD_FAMILY, new NullProgressMonitor()); plugin = null; ProvUIActivator.context = null; ui = null; } finally { super.stop(bundleContext); } }
public void stop() { SearchResultsPart results = (SearchResultsPart) parent.findPart(IHelpUIConstants.HV_FSEARCH_RESULT); results.canceling(); Job.getJobManager().cancel(FederatedSearchJob.FAMILY); }
/** * Removes all bundles from Java search */ public static void clearAll() { Job.getJobManager().cancel(JOB_FAMILY_ID); AddToJavaSearchJob job = new AddToJavaSearchJob(null, false); job.schedule(); }
public void dispose() { context.dispose(); Job.getJobManager().cancel(this); refreshSchedule.dispose(); }
@Override public void dispose() { context.dispose(); Job.getJobManager().cancel(this); refreshSchedule.dispose(); }
/** * Refresh a participant. The returned status describes the result of the refresh. * @param resources * @param taskName * @param monitor * @return a status */ public final IStatus refreshNow(IResource[] resources, String taskName, IProgressMonitor monitor) { Job.getJobManager().cancel(this); RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, taskName, taskName, resources, null); return job.run(monitor); }
/** * Adds/Removes the target bundles to/from Java search * * @param target The target definition whose bundles are to be added/removed. */ public static void synchWithTarget(ITargetDefinition target) { Job.getJobManager().cancel(JOB_FAMILY_ID); AddToJavaSearchJob job = new AddToJavaSearchJob(target); job.schedule(); }
/** * Adds or removes a set of bundles from Java search * * @param bundles bundles that are to be added/removed. * @param add <code>true</code> to add, <code>false></code> to remove */ public static void changeBundles(IPluginModelBase[] bundles, boolean add) { Job.getJobManager().cancel(JOB_FAMILY_ID); AddToJavaSearchJob job = new AddToJavaSearchJob(bundles, add); job.schedule(); }
/** * Refresh a participant. The returned status describes the result of the refresh. * @param resources * @param taskName * @param monitor * @return a status */ public final IStatus refreshNow(IResource[] resources, String taskName, IProgressMonitor monitor) { Job.getJobManager().cancel(this); RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, taskName, taskName, resources, null); return job.run(monitor); }
@Override public void dispose() { Job.getJobManager().cancel(this); refreshSchedule.dispose(); TeamUI.removePropertyChangeListener(this); collector.dispose(); scope.dispose(); }
public void sessionActivated(ICoverageSession session) { Job.getJobManager().cancel(LOADJOB); if (session == null) { coverage = null; fireCoverageChanged(); } else { coverage = IJavaModelCoverage.LOADING; fireCoverageChanged(); new LoadSessionJob(session).schedule(); } }
public synchronized void displaySource(Object context, IWorkbenchPage page, boolean force) { IStackFrame frame = (IStackFrame) context; SourceLookupJob slj = new SourceLookupJob(frame, frame.getLaunch().getSourceLocator(), page, force); // cancel any existing source lookup jobs for this page Job.getJobManager().cancel(slj); slj.schedule(); }
public void dispose() { Job.getJobManager().cancel(this); refreshSchedule.dispose(); TeamUI.removePropertyChangeListener(this); collector.dispose(); scope.dispose(); }
@Override public void dispose() { // Cancel any resolution jobs that are runnning Job.getJobManager().cancel(getTargetChangedListener().getJobFamily()); getTargetChangedListener().setContentTree(null); getTargetChangedListener().setLocationTree(null); fInputHandler.dispose(); super.dispose(); }
/** * Dispose any listeners in the receiver. */ void dispose() { markerListener.stop(); active = false; Job.getJobManager().cancel(MARKERSVIEW_UPDATE_JOB_FAMILY); if (workingSetListener != null) { PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(getWorkingSetListener()); } if (isIncremental()) { if (incrementJob != null) { incrementJob.clearEntries(); } } }
private void internalRefresh(IResource[] resources, String jobName, String taskName, IWorkbenchSite site, IRefreshSubscriberListener listener) { if (jobName == null) jobName = getShortTaskName(); if (taskName == null) taskName = getLongTaskName(resources); Job.getJobManager().cancel(this); RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, jobName, taskName, resources, listener); job.setUser(true); Utils.schedule(job, site); // Remember the last participant synchronized TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, getId()); TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, getSecondaryId()); }
private void internalRefresh(ResourceMapping[] mappings, String jobName, String taskName, IWorkbenchSite site, IRefreshSubscriberListener listener) { if (jobName == null) jobName = getShortTaskName(); if (taskName == null) taskName = getLongTaskName(mappings); Job.getJobManager().cancel(this); RefreshParticipantJob job = new RefreshModelParticipantJob(this, jobName, taskName, mappings, listener); job.setUser(true); Utils.schedule(job, site); // Remember the last participant synchronized TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, getId()); TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, getSecondaryId()); }