WorkspaceModifyOperation w = new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
Map<String,Object> map = new HashMap<String, Object>();
r.executeTask(monitor, task, map);
}
};
try {
PlatformUI.getWorkbench().getProgressService().run(true, false, w);