LocalTaskImpl (String name) { LocalTask defaultTask = myTaskManager.getActiveTask(); LocalTaskImpl task = myTaskManager.createLocalTask(name); final LocalTask localTask = myTaskManager.activateTask(task, true); myTaskManager.createBranch(localTask, defaultTask, name, null); UIUtil.dispatchAllInvocationEvents(); return task; }