コード例 #1
0
ファイル: UndoRedoStacksHolder.java プロジェクト: jexp/idea2
  public void removeFromStacks(UndoableGroup group) {
    if (group.getAffectedDocuments().isEmpty()) return;

    if (group.isGlobal()) {
      assert myGlobalStack.getLast() == group;
      myGlobalStack.removeLast();
    }
    for (DocumentReference each : group.getAffectedDocuments()) {
      LinkedList<UndoableGroup> stack = getStack(each);
      assert stack.getLast() == group;
      stack.removeLast();
    }
  }
コード例 #2
0
ファイル: UndoRedoStacksHolder.java プロジェクト: jexp/idea2
  public Set<DocumentReference> collectClashingActions(UndoableGroup group) {
    Set<DocumentReference> result = new THashSet<DocumentReference>();

    for (DocumentReference each : group.getAffectedDocuments()) {
      UndoableGroup last = getStack(each).getLast();
      if (last != group) {
        result.addAll(last.getAffectedDocuments());
      }
    }

    if (group.isGlobal()) {
      UndoableGroup last = myGlobalStack.getLast();
      if (last != group) {
        result.addAll(last.getAffectedDocuments());
      }
    }

    return result;
  }
コード例 #3
0
ファイル: UndoRedoStacksHolder.java プロジェクト: jexp/idea2
 public void addToStacks(UndoableGroup group) {
   if (group.isGlobal()) doAddToStack(myGlobalStack, group, UndoManagerImpl.GLOBAL_UNDO_LIMIT);
   for (DocumentReference each : group.getAffectedDocuments()) {
     doAddToStack(getStack(each), group, UndoManagerImpl.LOCAL_UNDO_LIMIT);
   }
 }