当前页面: 
在线文档首页 > 
NetBeans API Javadoc (Current Development Version)
FoldHierarchyTransaction (Editor Code Folding) - NetBeans API Javadoc (Current Development Version)
org.netbeans.spi.editor.fold
Class FoldHierarchyTransaction
java.lang.Object
  
org.netbeans.spi.editor.fold.FoldHierarchyTransaction
public final class FoldHierarchyTransaction
- extends Object
 
Class encapsulating a modification
 of the code folding hierarchy.
 
 It's provided by FoldOperation.openTransaction().
 
 It can accumulate arbitrary number of changes of various folds
 by being passed as argument to particular methods in the FoldOperation.
 
 Only one transaction can be active at the time.
 
 Once all the modifications are done the transaction must be
 committed by commit() which creates
 a FoldHierarchyEvent
 and fires it to the listeners automatically.
 
 Once the transaction is committed no additional
 changes can be made to it.
 
 There is currently no way to rollback the transaction.
| 
Method Summary | 
 void | 
commit()
 
          Commit this transaction. | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
commit
public void commit()
- Commit this transaction.
 
 Transaction can only be committed once.
- Throws:
 IllegalStateException - if the transaction is attempted
  to be commited more than once.