runInWorkspace
instead of the usual Job.run
method. After running a method that modifies resources in the workspace, registered listeners receive after-the-fact notification of what just transpired, in the form of a resource change event. This method allows clients to call a number of methods that modify resources and only have resource change event notifications reported at the end of the entire batch.
A WorkspaceJob is the asynchronous equivalent of IWorkspaceRunnable
Note that the workspace is not locked against other threads during the execution of a workspace job. Other threads can be modifying the workspace concurrently with a workspace job. To obtain exclusive access to a portion of the workspace, set the scheduling rule on the job to be a resource scheduling rule. The interface IResourceRuleFactory is used to create a scheduling rule for a particular workspace modification operation.
@see IWorkspaceRunnable @see org.eclipse.core.resources.IResourceRuleFactory @see IWorkspace#run(IWorkspaceRunnable,ISchedulingRule,int,IProgressMonitor) @since 3.0
|
|
|
|
|
|