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.