|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.actions.WorkspaceModifyOperation
An operation which potentially makes changes to the workspace. All resource modification should be performed using this operation. The primary consequence of using this operation is that events which typically occur as a result of workspace changes (such as the firing of resource deltas, performance of autobuilds, etc.) are deferred until the outermost operation has successfully completed.
Subclasses must implement execute
to do the work of the
operation.
Constructor Summary | |
protected |
WorkspaceModifyOperation()
Creates a new operation. |
Method Summary | |
protected abstract void |
execute(IProgressMonitor monitor)
Performs the steps that are to be treated as a single logical workspace change. |
void |
run(IProgressMonitor monitor)
The WorkspaceModifyOperation implementation of this
IRunnableWithProgress method initiates a batch of changes by
invoking the execute method as a workspace runnable
(IWorkspaceRunnable ). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected WorkspaceModifyOperation()
Method Detail |
protected abstract void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException
Subclasses must implement this method.
monitor
- the progress monitor to use to display progress and field
user requests to cancel
CoreException
- if the operation fails due to a CoreException
InvocationTargetException
- if the operation fails due to an exception other than CoreException
InterruptedException
- if the operation detects a request to cancel,
using IProgressMonitor.isCanceled()
, it should exit by throwing
InterruptedException
public final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
WorkspaceModifyOperation
implementation of this
IRunnableWithProgress
method initiates a batch of changes by
invoking the execute
method as a workspace runnable
(IWorkspaceRunnable
).
run
in interface IRunnableWithProgress
monitor
- the progress monitor to use to display progress and receive
requests for cancelation
InterruptedException
- if the operation detects a request to cancel,
using IProgressMonitor.isCanceled()
, it should exit by throwing
InterruptedException
InvocationTargetException
- if the run method must propagate a checked exception,
it should wrap it inside an InvocationTargetException
; runtime exceptions are automatically
wrapped in an InvocationTargetException
by the calling contextIRunnableContext.run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |