org.eclipse.rse.ui.operations
Class SystemJobRunnableContext
java.lang.Object
org.eclipse.rse.ui.operations.SystemJobRunnableContext
-
All Implemented Interfaces:
-
ISystemRunnableContext
-
public final class SystemJobRunnableContext
- extends
Object
- implements
ISystemRunnableContext
This runnable context executes its operation in the context of a background job.
Method Summary
|
ISchedulingRule
|
getSchedulingRule
()
Returns the scheduling rule that will be obtained before the context
executes a runnable, or null if no scheduling rule is to be obtained. |
Shell
|
getShell
()
Returns the shell. |
boolean
|
isPostponeBuild
()
Returns whether auto-builds will be postponed while this
context is executing a runnable. |
boolean
|
isUser
()
Returns whether the job created by this runnable context is user initiated. |
void
|
run
(
IRunnableWithProgress runnable)
Runs the given runnable in the context of the receiver. |
static void
|
schedule
(
Job job,
IWorkbenchSite site)
Schedules the job. |
void
|
setPostponeBuild
(boolean postponeBuild)
Sets whether auto-builds will be postponed while this
context is executing a runnable. |
void
|
setSchedulingRule
(
ISchedulingRule schedulingRule)
Sets the scheduling rule that will be obtained before the context
executes a runnable, or null if no scheduling rule is to be obtained. |
void
|
setUser
(boolean isUser)
Sets wheter the job created by this runnable context is user initiated. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
SystemJobRunnableContext
public SystemJobRunnableContext(
String jobName)
- Constructor.
-
Parameters:
-
jobName
- the name of the job.
SystemJobRunnableContext
public SystemJobRunnableContext(
String jobName,
URL icon,
IAction action,
boolean keep,
IJobChangeListener listener,
IWorkbenchSite site)
- Constructor.
-
Parameters:
-
jobName
- the name of the job. -
icon
- the icon for the job. -
action
- the action for the job. -
keep
- keep the job in the UI even after it is finished. -
listener
- listener for job changes. -
site
- the workbench site.
run
public void run(
IRunnableWithProgress runnable)
-
Description copied from interface:
ISystemRunnableContext
- Runs the given runnable in the context of the receiver. By default, the
progress is provided by the active workbench window but subclasses may
override this to provide progress in some other way (through Progress view using Eclipse Job support).
-
-
Specified by:
-
run
in interface
ISystemRunnableContext
-
-
See Also:
-
ISystemRunnableContext.run(org.eclipse.jface.operation.IRunnableWithProgress)
getShell
public
Shell getShell()
- Returns the shell.
-
-
Specified by:
-
getShell
in interface
ISystemRunnableContext
-
-
Returns:
- a shell.
-
See Also:
-
ISystemRunnableContext.getShell()
isPostponeBuild
public boolean isPostponeBuild()
- Returns whether auto-builds will be postponed while this
context is executing a runnable.
-
-
-
Returns:
-
true
if auto-builds will be postponed while this
context is executing a runnable, false
otherwise.
setPostponeBuild
public void setPostponeBuild(boolean postponeBuild)
- Sets whether auto-builds will be postponed while this
context is executing a runnable.
-
-
-
Parameters:
-
postponeBuild
- true
to postpone auto-builds, false
otherwise.
getSchedulingRule
public
ISchedulingRule getSchedulingRule()
- Returns the scheduling rule that will be obtained before the context
executes a runnable, or
null
if no scheduling rule is to be obtained.
-
-
-
Returns:
- the schedulingRule to be used or
null
.
isUser
public boolean isUser()
- Returns whether the job created by this runnable context is user initiated.
-
-
-
Returns:
-
true
if the job is a result of user initiated actions, false
otherwise.
setUser
public void setUser(boolean isUser)
- Sets wheter the job created by this runnable context is user initiated.
By default, the job is a user initiated job.
-
-
-
Parameters:
-
isUser
- true
if the job is a result of user initiated actions, false
otherwise.
setSchedulingRule
public void setSchedulingRule(
ISchedulingRule schedulingRule)
- Sets the scheduling rule that will be obtained before the context
executes a runnable, or
null
if no scheduling rule is to be obtained.
-
-
-
Parameters:
-
schedulingRule
- the scheduling rule to be used or null
.
schedule
public static void schedule(
Job job,
IWorkbenchSite site)
- Schedules the job.
-
-
-
Parameters:
-
job
- the job to schedule. -
site
- the workbench site.
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.