-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 578871 - UndoableOperation2ChangeAdapter use ISchedulableOperation
Give the caller of the UndoableOperation2ChangeAdapter.execute a hint that this operation aquires workspace.root as ISchedulingRule. It freezed the eclipse UI as long as any other Thread (for example autobuild) had any lock in the workspace. With the hint a UI can prevent to freeze while waiting for the rule. The original call to ResourcesPlugin.getWorkspace().run(runnable, pm); is equivalent to the call of Workspace.run(IWorkspaceRunnable, IProgressMonitor), which is implemented internally as run((ICoreRunnable) action, defaultRoot, IWorkspace.AVOID_UPDATE, monitor); - means, changing the original code to proposed one is safe and doesn't change any behavior because the executed code it is identical at the end. It only gives a hint about the lock that is used anyway. Workspace.run(IWorkspaceRunnable, IProgressMonitor) was inlined to give a uniform pattern where the lock is aquired.
- Loading branch information
1 parent
8eb048c
commit 72c4c91
Showing
3 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters