public abstract class WorkbenchJob extends UIJob
Constructor and Description |
---|
WorkbenchJob(Display jobDisplay,
String name)
Create a new instance of the receiver with the
supplied display and name.
|
WorkbenchJob(String name)
Add a new instance of the reciever with the
supplied name.
|
Modifier and Type | Method and Description |
---|---|
void |
performDone(IJobChangeEvent event)
Perform done with the supplied event.
|
boolean |
shouldRun()
Returns whether this job should be run.
|
boolean |
shouldSchedule()
Returns whether this job should be scheduled.
|
errorStatus, getDisplay, run, runInUIThread, setDisplay
addJobChangeListener, belongsTo, cancel, canceling, create, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, sleep, toString, wakeUp, wakeUp, yieldRule
getAdapter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAdapter
public WorkbenchJob(Display jobDisplay, String name)
jobDisplay
- Display. The display to run the
job with.name
- Stringpublic WorkbenchJob(String name)
name
- Stringpublic void performDone(IJobChangeEvent event)
event
- IJobChangeEventpublic boolean shouldSchedule()
Job
false
is 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
.
shouldSchedule
in class Job
true
if the job manager should schedule this job
and false
otherwisepublic boolean shouldRun()
Job
false
is 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
.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.