Package com.iizigo.prop
Class PropUndoRedoAdapter
java.lang.Object
com.iizigo.prop.PropUndoRedoAdapter
- All Implemented Interfaces:
- IDisposedPart,- IPropUndoRedo
Abstract adapter for interface used for undo/redo operations in properties.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescriptionConstructor without target viewer.- PropUndoRedoAdapter- (Shell shell, IUndoContext undoContext) Constructor without target viewer.- PropUndoRedoAdapter- (Shell shell, Viewer targetViewer, IUndoContext undoContext) Constructor.
- Method SummaryModifier and TypeMethodDescription- getShell()Gets the shell.- final ObjectGets the structured viewer (common, tree or table) used for the property operation (add, delete, etc).- final ObjectGets the undo context.- booleanChecks if the part is disposed of.- final void- setTargetViewer- (Object viewer) Sets the structured viewer (common, tree or table) used for the property operation (add, delete, etc).- voidUpdates the states of menu items and tool bars.
- Constructor Details- PropUndoRedoAdapterConstructor without target viewer. Use setTargetViewer to set a specific viewer or let the system figure out which one is in focus.- Parameters:
- part- The editor part or view.
 
- PropUndoRedoAdapterConstructor without target viewer. Use setTargetViewer to set a specific viewer or let the system figure out which one is in focus.- Parameters:
- shell- The Shell instance.
- undoContext- An instance of IUndoContext.
 
- PropUndoRedoAdapterConstructor.- Parameters:
- shell- The Shell instance.
- targetViewer- The target viewer instance: CommonViewer, TreeViewer or TableViewer, or null for none.
- undoContext- An instance of IUndoContext.
 
 
- Method Details- getShellGets the shell.- Specified by:
- getShellin interface- IPropUndoRedo
- Returns:
- An object castable to org.eclipse.swt.widgets.Shell.
 
- getUndoContextGets the undo context.- Specified by:
- getUndoContextin interface- IPropUndoRedo
- Returns:
- An object castable to org.eclipse.core.commands.operations.IUndoContext.
 
- updateStatespublic void updateStates()Updates the states of menu items and tool bars.- Specified by:
- updateStatesin interface- IPropUndoRedo
 
- setTargetViewerSets the structured viewer (common, tree or table) used for the property operation (add, delete, etc).- Specified by:
- setTargetViewerin interface- IPropUndoRedo
- Parameters:
- viewer- The CommonViewer, TreeViewer or TableViewer, or null for none.
 
- getTargetViewerGets the structured viewer (common, tree or table) used for the property operation (add, delete, etc).- Specified by:
- getTargetViewerin interface- IPropUndoRedo
- Returns:
- The CommonViewer, TreeViewer or TableViewer, or null for none.
 
- isDisposedpublic boolean isDisposed()Checks if the part is disposed of.- Specified by:
- isDisposedin interface- IDisposedPart
- Returns:
- true if disposed of, false otherwise.