|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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
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.
Field Summary |
Fields inherited from class org.eclipse.core.runtime.jobs.Job |
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING |
Constructor Summary | |
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. |
Method Summary | |
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. |
Methods inherited from class org.eclipse.ui.progress.UIJob |
errorStatus, getDisplay, run, runInUIThread, setDisplay |
Methods inherited from class org.eclipse.core.runtime.jobs.Job |
addJobChangeListener, belongsTo, cancel, done, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, sleep, wakeUp, wakeUp |
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob |
compareTo, toString |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
getAdapter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Constructor Detail |
public WorkbenchJob(Display jobDisplay, String name)
jobDisplay
- Display. The display to run the
job with.name
- Stringpublic WorkbenchJob(String name)
name
- StringMethod Detail |
public 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 pre-condition 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 pre-condition 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
.
shouldRun
in class Job
true
if this job should be run
and false
otherwise
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.