| java.lang.Object org.eclipse.ui.actions.WorkspaceModifyOperation
All known Subclasses: org.eclipse.ui.wizards.datatransfer.ImportOperation, org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation,
WorkspaceModifyOperation | abstract public class WorkspaceModifyOperation implements IRunnableWithProgress,IThreadListener(Code) | | 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 generally deferred until the outermost operation
has successfully completed. The platform may still decide to broadcast
periodic resource change notifications during the scope of the operation
if the operation runs for a long time or another thread modifies the workspace
concurrently.
If a scheduling rule is provided, the operation will obtain that scheduling
rule for the duration of its execute method. If no scheduling
rule is provided, the operation will obtain a scheduling rule that locks
the entire workspace for the duration of the operation.
Subclasses must implement execute to do the work of the
operation.
See Also: ISchedulingRule See Also: org.eclipse.core.resources.IWorkspace.run(IWorkspaceRunnableIProgressMonitor) |
Method Summary | |
abstract protected void | execute(IProgressMonitor monitor) Performs the steps that are to be treated as a single logical workspace
change.
Subclasses must implement this method.
Parameters: monitor - the progress monitor to use to display progress and fielduser requests to cancel exception: CoreException - if the operation fails due to a CoreException exception: InvocationTargetException - if the operation fails due to an exception other than CoreException exception: InterruptedException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled() , it should exit by throwing InterruptedException . | final public synchronized 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 ). | public void | threadChange(Thread thread) |
WorkspaceModifyOperation | protected WorkspaceModifyOperation()(Code) | | Creates a new operation.
|
WorkspaceModifyOperation | protected WorkspaceModifyOperation(ISchedulingRule rule)(Code) | | Creates a new operation that will run using the provided
scheduling rule.
Parameters: rule - The ISchedulingRule to use or null . since: 3.0 |
execute | abstract protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException(Code) | | Performs the steps that are to be treated as a single logical workspace
change.
Subclasses must implement this method.
Parameters: monitor - the progress monitor to use to display progress and fielduser requests to cancel exception: CoreException - if the operation fails due to a CoreException exception: InvocationTargetException - if the operation fails due to an exception other than CoreException exception: InterruptedException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled() , it should exit by throwing InterruptedException . It is also possible to throw OperationCanceledException , which gets mapped to InterruptedException by the run method. |
run | final public synchronized void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException(Code) | | The WorkspaceModifyOperation implementation of this
IRunnableWithProgress method initiates a batch of changes by
invoking the execute method as a workspace runnable
(IWorkspaceRunnable ).
|
|
|