コード例 #1
0
  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());
  }
コード例 #2
0
  @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);
  }