Package org.eclipse.ui.progress
Class WorkbenchJob
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
org.eclipse.core.runtime.jobs.Job
org.eclipse.ui.progress.UIJob
org.eclipse.ui.progress.WorkbenchJob
- All Implemented Interfaces:
- Comparable<org.eclipse.core.internal.jobs.InternalJob>,- IAdaptable
WorkbenchJob is a type of job that implements a done listener and does the
 shutdown checks before scheduling. This is used if a job is not meant to run
 when the Workbench is shutdown.
- Since:
- 3.0
- 
Field SummaryFields inherited from class org.eclipse.core.runtime.jobs.JobASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITINGFields inherited from class org.eclipse.core.internal.jobs.InternalJobmanager
- 
Constructor SummaryConstructorsConstructorDescriptionWorkbenchJob(String name) Add a new instance of the receiver with the supplied name.WorkbenchJob(Display jobDisplay, String name) Create a new instance of the receiver with the supplied display and name.
- 
Method SummaryModifier and TypeMethodDescriptionvoidperformDone(IJobChangeEvent event) Perform done with the supplied event.booleanReturns whether this job should be run.booleanReturns whether this job should be scheduled.Methods inherited from class org.eclipse.ui.progress.UIJobcreate, create, errorStatus, getDisplay, run, runInUIThread, setDisplayMethods inherited from class org.eclipse.core.runtime.jobs.JobaddJobChangeListener, belongsTo, cancel, canceling, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, sleep, toString, wakeUp, wakeUp, yieldRuleMethods inherited from class org.eclipse.core.internal.jobs.InternalJobcompareToMethods inherited from class org.eclipse.core.runtime.PlatformObjectgetAdapter
- 
Constructor Details- 
WorkbenchJobCreate a new instance of the receiver with the supplied display and name. Normally this constructor would not be used as it is best to let the job find the display from the workbench- Parameters:
- jobDisplay- Display. The display to run the job with.
- name- String
 
- 
WorkbenchJobAdd a new instance of the receiver with the supplied name.- Parameters:
- name- String
 
 
- 
- 
Method Details- 
performDonePerform done with the supplied event. This will only occur if the returned status was OK. This is called only if the job is finished with an IStatus.OK result and the workbench is still running.- Parameters:
- event- IJobChangeEvent
 
- 
shouldSchedulepublic boolean shouldSchedule()Description copied from class:JobReturns whether this job should be scheduled. Iffalseis returned, this job will be discarded by the job manager without being added to the queue.This method is called immediately prior to adding the job to the waiting job queue.,so it can be used for last minute precondition checking before a job is scheduled. Clients may override this method. This default implementation always returns true.- Overrides:
- shouldSchedulein class- Job
- Returns:
- trueif the job manager should schedule this job and- falseotherwise
 
- 
shouldRunpublic boolean shouldRun()Description copied from class:JobReturns whether this job should be run. Iffalseis returned, this job will be discarded by the job manager without running.This method is called immediately prior to calling the job's run method, so it can be used for last minute precondition checking before a job is run. This method must not attempt to schedule or change the state of any other job. Clients may override this method. This default implementation always returns true.
 
-