Ejemplo n.º 1
0
 public void accept(ChangeVisitor v) {
   try {
     for (ChangeSet change : iterChanges()) {
       change.accept(v);
     }
   } catch (ChangeVisitor.StopVisitingException e) {
   }
   v.finished();
 }
Ejemplo n.º 2
0
  private boolean doEndChangeSet(String name) {
    if (myCurrentChangeSet.isEmpty()) {
      myCurrentChangeSet = null;
      return false;
    }

    myCurrentChangeSet.setName(name);
    myCurrentChangeSet.lock();

    myStorage.writeNextSet(myCurrentChangeSet);
    myCurrentChangeSet = null;

    return true;
  }
Ejemplo n.º 3
0
 public synchronized void close() {
   if (!ApplicationManager.getApplication().isUnitTestMode()) {
     LocalHistoryLog.LOG.assertTrue(
         myCurrentChangeSet == null || myCurrentChangeSet.isEmpty(),
         "current changes won't be saved: " + myCurrentChangeSet);
   }
   myStorage.close();
 }
Ejemplo n.º 4
0
 public synchronized void addChange(Change c) {
   assert myChangeSetDepth != 0;
   myCurrentChangeSet.addChange(c);
 }