public String getPresentationName() { if( presentationName != null ) { return presentationName; } else { return super.getPresentationName(); } }
/** * Returns the presentation name. * If the presentation name is null, then CompoundEdit.getPresentatioName * is returned. * @see javax.swing.undo.CompoundEdit#getPresentationName() */ @Override public String getPresentationName() { return (presentationName != null) ? presentationName : super.getPresentationName(); } /**
@Override public String getPresentationName() { if( _strDisplayName != null && _strDisplayName.length() > 0 ) { return _strDisplayName; } return super.getPresentationName(); }
@Override public String getPresentationName() { if( _strDisplayName != null && _strDisplayName.length() > 0 ) { return _strDisplayName; } return super.getPresentationName(); }
if( undoAtom != null && undoAtom.getPresentationName().equals( "Script Change" ) )
@Override public void caretUpdate( CaretEvent e ) { if( isPaused() ) { return; } updatePositionInfo(); _bCaretPosChangeIsEdit = false; final CompoundEdit undoAtom = _undoMgr.getUndoAtom(); if( undoAtom != null && undoAtom.getPresentationName().equals( "Text Change" ) ) { // Note we invokeLater because undoableEditHappened is called directly after // caretUpdate() i.e., it has to set _bCaretPosChangeIsEdit to true in order for us to // know whether or not an actual undoable edit is related to the caret pos change. EventQueue.invokeLater( () -> { if( !_bCaretPosChangeIsEdit ) { if( undoAtom == _undoMgr.getUndoAtom() ) { // The caret moved without a text change e.g., arrow key pressed, // so terminate the undo batch with the position change. _undoMgr.endUndoAtom(); } } } ); } }
void handleEnter() { CompoundEdit undoAtom = getUndoManager().beginUndoAtom( "New Line" ); try { _handleEnter(); } finally { getUndoManager().endUndoAtom( undoAtom ); undoAtom = _undoMgr.getUndoAtom(); if( undoAtom != null && undoAtom.getPresentationName().equals( "Script Change" ) ) { _undoMgr.endUndoAtom(); } } }
if( undoAtom != null && undoAtom.getPresentationName().equals( "Script Change" ) )
if( undoAtom != null && undoAtom.getPresentationName().equals( "Text Change" ) )
void handleEnter() { CompoundEdit undoAtom = getUndoManager().beginUndoAtom( "New Line" ); try { _handleEnter(); } finally { getUndoManager().endUndoAtom( undoAtom ); undoAtom = getUndoManager().getUndoAtom(); if( undoAtom != null && undoAtom.getPresentationName().equals( "Text Change" ) ) { getUndoManager().endUndoAtom(); } } }
public void duplicate() { DocumentFilter documentFilter = getGosuDocument().getDocumentFilter(); if( documentFilter == null || ((SimpleDocumentFilter)documentFilter).acceptEdit( "" ) ) { CompoundEdit undoAtom = _undoMgr.getUndoAtom(); if( undoAtom != null && undoAtom.getPresentationName().equals( "Script Change" ) ) { _undoMgr.endUndoAtom(); } undoAtom = getUndoManager().beginUndoAtom( "Duplicate Line" ); try { _duplicate(); } finally { getUndoManager().endUndoAtom( undoAtom ); } } }
public void duplicate() { DocumentFilter documentFilter = getDocument().getDocumentFilter(); if( documentFilter == null || ((SimpleDocumentFilter)documentFilter).acceptEdit( "" ) ) { CompoundEdit undoAtom = _undoMgr.getUndoAtom(); if( undoAtom != null && undoAtom.getPresentationName().equals( "Text Change" ) ) { _undoMgr.endUndoAtom(); } undoAtom = getUndoManager().beginUndoAtom( "Duplicate Line" ); try { _duplicate(); } finally { getUndoManager().endUndoAtom( undoAtom ); } } }
if( undoAtom != null && undoAtom.getPresentationName().equals( "Script Change" ) )
if( undoAtom != null && undoAtom.getPresentationName().equals( "Script Change" ) ) if( undoAtom == null || !undoAtom.getPresentationName().equals( "Script Change" ) )
if( undoAtom != null && undoAtom.getPresentationName().equals( "Text Change" ) ) if( undoAtom == null || !undoAtom.getPresentationName().equals( "Text Change" ) )
if( undoAtom != null && undoAtom.getPresentationName().equals( "Text Change" ) )