org.eclipse.core.commands.operations.ObjectUndoContext Java Examples
The following examples show how to use
org.eclipse.core.commands.operations.ObjectUndoContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XLIFFEditorImplWithNatTable.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
private void initializeOperationHistory() { // create a unique undo context to // represent this view's undo history undoContext = new ObjectUndoContext(this); // set the undo limit for this context based on the preference HISTORY.setLimit(undoContext, 99); // 初始化“重做、”“撤销”菜单项 undoRedoGroup = new UndoRedoActionGroup(getSite(), undoContext, true); }
Example #2
Source File: XLIFFEditorImplWithNatTable.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
private void initializeOperationHistory() { // create a unique undo context to // represent this view's undo history undoContext = new ObjectUndoContext(this); // set the undo limit for this context based on the preference HISTORY.setLimit(undoContext, 99); // 初始化“重做、”“撤销”菜单项 undoRedoGroup = new UndoRedoActionGroup(getSite(), undoContext, true); }
Example #3
Source File: JSEditor.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * Returns current undo level. * * @return current undo level. */ private int getUndoLevel( ) { SourceViewer viewer = getViewer( ); IUndoableOperation[] history = viewer == null ? null : OperationHistoryFactory.getOperationHistory( ) .getUndoHistory( new ObjectUndoContext( viewer.getDocument( ) ) ); return history == null ? -1 : history.length; }