public void testSaveContext() throws Exception { WorkingContextManager manager = getContextManager(); manager.saveContext("first", "comment"); manager.clearContext(); manager.loadContext("first"); manager.saveContext(myTaskManager.getActiveTask()); manager.clearContext(); manager.restoreContext(myTaskManager.getActiveTask()); }
@Override public LocalTask activateTask(@NotNull final Task origin, boolean clearContext) { LocalTask activeTask = getActiveTask(); if (origin.equals(activeTask)) return activeTask; saveActiveTask(); if (clearContext) { myContextManager.clearContext(); } myContextManager.restoreContext(origin); final LocalTask task = doActivate(origin, true); return restoreVcsContext(task); }