Refine search
/** * Schedule the job to process the events now. */ protected void schedule() { eventHandlerJob.schedule(); }
/** * 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. }
void triggerNewUpdateNotification() { Job notifyJob = new Job("Update validate job") { //$NON-NLS-1$ public IStatus run(IProgressMonitor monitor) { if (monitor.isCanceled()) return Status.CANCEL_STATUS; // notify that updates are available for all roots. We don't know for sure that // there are any, but this will cause everything to be rechecked. Don't trigger // a popup, just update the affordance and internal state. updatesAvailable(new UpdateEvent(profileId, getInstalledIUs())); return Status.OK_STATUS; } }; notifyJob.setSystem(true); notifyJob.setUser(false); notifyJob.setPriority(Job.LONG); notifyJob.schedule(); }
ThreadJob(ISchedulingRule rule) { super("Implicit Job"); //$NON-NLS-1$ setSystem(true); setPriority(Job.INTERACTIVE); ruleStack = new ISchedulingRule[2]; top = -1; setRule(rule); }
public AsyncTableRenderingCellModifier(AbstractAsyncTableRendering rendering, ICellModifier customModifier) { fRendering = rendering; fCustomModifier = customModifier; Job job = new Job("AsyncTableRenderingCellModifier"){ //$NON-NLS-1$ @Override protected IStatus run(IProgressMonitor monitor) { fMBSupportsValueModification = fRendering.getMemoryBlock().supportsValueModification(); return Status.OK_STATUS; }}; job.setSystem(true); job.schedule(); }
public void run() { if (fInputFile.exists()) { Job job = getOpenLogFileJob(); job.setUser(false); job.setPriority(Job.SHORT); job.schedule(); } } };
/** * Constructs a new operation to load the specified target definition * as the current target platform. When <code>null</code> is specified * the target platform is empty and all other settings are default. This * method will cancel all existing LoadTargetDefinitionJob instances then * schedules the operation as a user job. Adds the given listener to the * job that is started. * * @param target target definition or <code>null</code> if none * @param listener job change listener that will be added to the created job */ public static void load(ITargetDefinition target, IJobChangeListener listener) { Job.getJobManager().cancel(JOB_FAMILY_ID); Job job = new LoadTargetDefinitionJob(target); job.setUser(true); if (listener != null) { job.addJobChangeListener(listener); } job.schedule(); }
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(); }
@Override public IStatus runInUIThread(IProgressMonitor monitor) { Job job = new RealJob(JavaUIMessages.JavaPlugin_initializing_ui); job.setPriority(Job.SHORT); job.schedule(); return Status.OK_STATUS; } }
@Override public void retrieveChildren(final Object parent, final IPresentationContext context, final IChildrenRequestMonitor result) { Job job = new Job("Retrieving Children") { //$NON-NLS-1$ @Override protected IStatus run(IProgressMonitor monitor) { if (!monitor.isCanceled()) { computeChildren(parent, context, result); } return Status.OK_STATUS; } }; job.setSystem(true); job.setRule(getRetrieveChildrenRule(parent, context)); job.schedule(); }
/** * Schedule the job or process the events now. */ @Override public void schedule() { Job job = getEventHandlerJob(); if (job.getState() == Job.NONE) { if(progressGroup != null) { job.setSystem(false); job.setProgressGroup(progressGroup, ticks); } else { job.setSystem(isSystemJob()); } } getEventHandlerJob().schedule(); }
@Override public void run() { Job job = new UnusedDependenciesJob(PDEUIMessages.UnusedDependenciesAction_jobName, fModel, fReadOnly); job.setUser(true); job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_PSEARCH_OBJ.createImage()); job.schedule(); }
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(); } }
private void cancelBuild(Object jobfamily) { Job[] buildJobs = Job.getJobManager().find(jobfamily); for (Job curr : buildJobs) { if (curr != this && curr instanceof BuildJob) { BuildJob job = (BuildJob) curr; if (job.isCoveredBy(this)) { curr.cancel(); // cancel all other build jobs of our // kind } } } }
/** * Signals the beginning of the notification phase at the end of a top level operation. */ public void beginNotify() { notifyJob.cancel(); notificationRequested = false; }
private IStatus run0(IProgressMonitor monitor) throws Exception { if (!javaElements.isEmpty()) { final Queue<RefactoringUnit> toRefactor = collectRefactoringUnits(javaElements, monitor); final int nbCores = Runtime.getRuntime().availableProcessors(); final int nbWorkers = computeNbWorkers(toRefactor.size(), nbCores); final JobGroup jobGroup = new JobGroup("Job name", nbWorkers, nbWorkers); for (int i = 0; i < nbWorkers; i++) { final Job job = new ApplyRefactoringsJob(toRefactor, clone(refactoringRulesToApply), environment); job.setJobGroup(jobGroup); job.setUser(true); job.schedule(); } } return Status.OK_STATUS; }