|
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.jobs.JobChangeAdapter
org.eclipse.team.ui.TeamOperation
An operation that can be configured to run in the foreground using the IProgressService or the background as a Job. The execution context is determined by what is returned by the canRunAsJob() hint which may be overriden by subclasses. Subsclass must override the run(IProgressMonitor) method to perform the behavior of the operation in the desired execution context.
If this operation is run as a job, it is registered with the job as a IJobChangeListener and is scheduled with the part of this operation if it is not null. Subsclasses can override the methods of this interface to receive job change notifications.
Constructor Summary | |
protected | TeamOperation(IRunnableContext context)
Create an team operation that will run in the given context. |
protected | TeamOperation(IWorkbenchPart part)
Create an team operation associated with the given part. |
protected | TeamOperation(IWorkbenchPart part,
IRunnableContext context)
Create an team operation associated with the given part that will run in the given context. |
Method Summary | |
protected boolean | canRunAsJob()
If this operation can safely be run in the background, then subclasses can override this method and return true. |
protected IAction | getGotoAction()
This method is called to allow subclasses to configure an action that could be run to show the results of the action to the user. |
protected String | getJobName()
Return the job name to be used if the action can run as a job. |
protected boolean | getKeepOperation()
This method is called to allow subclasses to have the operation remain in the progress indicator even after the job is done. |
protected URL | getOperationIcon()
This method is called to allow subclasses to configure an icon to show when running this operation. |
IWorkbenchPart | getPart()
Return the part that is associated with this operation. |
protected ISchedulingRule | getSchedulingRule()
Returns the scheduling rule that is to be obtained before this operation is executed by it's context or null if no scheduling rule is to be obtained. |
protected Shell | getShell()
Return a shell that can be used by the operation to display dialogs, etc. |
protected boolean | isPostponeAutobuild()
Return whether the auto-build should be postponed until after the operation is complete. |
void | run()
Run the operation in a context that is determined by the canRunAsJob() hint. |
protected boolean | shouldRun()
This method is invoked from the run() method before the operation is run in the operation's context. |
Methods inherited from class org.eclipse.core.runtime.jobs.JobChangeAdapter |
aboutToRun, awake, done, running, scheduled, sleeping |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.operation.IRunnableWithProgress |
run |
Constructor Detail |
protected TeamOperation(IWorkbenchPart part)
protected TeamOperation(IRunnableContext context)
protected TeamOperation(IWorkbenchPart part, IRunnableContext context)
Method Detail |
public IWorkbenchPart getPart()
public final void run() throws InvocationTargetException, InterruptedException
protected boolean shouldRun()
protected ISchedulingRule getSchedulingRule()
By default, no scheduling rule is obtained. Sublcasses can override to in order ot obtain a scheduling rule or can obtain schduling rules withing their operation if finer grained schduling is desired.
protected boolean isPostponeAutobuild()
protected boolean canRunAsJob()
protected String getJobName()
protected IAction getGotoAction()
protected URL getOperationIcon()
protected boolean getKeepOperation()
protected Shell getShell()
|
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.