Class UndoablePropertySheetEntry
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.views.properties.PropertySheetEntry
org.eclipse.gef.mvc.fx.ui.properties.UndoablePropertySheetEntry
- All Implemented Interfaces:
IPropertySheetEntry
UndoablePropertySheetEntry provides undo support for changes made to
IPropertySources by the PropertySheetViewer. Clients can construct a
PropertySheetPage
and use this class
as the root entry. All changes made to property sources displayed on that
page will be done using the provided IOperationHistory
.
NOTE: If you intend to use an IPropertySourceProvider for a PropertySheetPage whose root entry is an instance of of UndoablePropertySheetEntry, you should set the IPropertySourceProvider on that root entry, rather than the PropertySheetPage.
-
Field Summary
Fields inherited from interface org.eclipse.ui.views.properties.IPropertySheetEntry
FILTER_ID_EXPERT
-
Constructor Summary
ConstructorsConstructorDescriptionUndoablePropertySheetEntry
(IWorkbenchPart workbenchPart, IOperationHistory operationHistory, IUndoContext undoContext) Constructs a new root entry. -
Method Summary
Modifier and TypeMethodDescriptionprotected PropertySheetEntry
void
dispose()
protected IOperationHistory
Returns theIOperationHistory
that is used by this entry.protected IPropertySource
getPropertySource
(Object object) void
void
protected void
valueChanged
(UndoablePropertySheetEntry child, ITransactionalOperation operation) Update parent entry about change, being encapsulated into the given operation.protected void
valueChanged
(PropertySheetEntry child) Methods inherited from class org.eclipse.ui.views.properties.PropertySheetEntry
addPropertySheetEntryListener, applyEditorValue, getBackground, getCategory, getChildEntries, getDescription, getDescriptor, getDisplayName, getEditor, getEditValue, getErrorText, getFilters, getFont, getForeground, getHelpContextIds, getImage, getParent, getValueAsString, getValues, hasChildEntries, refreshFromRoot, removePropertySheetEntryListener, setPropertySourceProvider
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Constructor Details
-
UndoablePropertySheetEntry
public UndoablePropertySheetEntry(IWorkbenchPart workbenchPart, IOperationHistory operationHistory, IUndoContext undoContext) Constructs a new root entry.- Parameters:
workbenchPart
- TheIWorkbenchPart
to adapt for anIPropertySource
, in case no values are provided.operationHistory
- TheIOperationHistory
to use.undoContext
- TheIUndoContext
to use.
-
-
Method Details
-
createChildEntry
- Overrides:
createChildEntry
in classPropertySheetEntry
- See Also:
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIPropertySheetEntry
- Overrides:
dispose
in classPropertySheetEntry
- See Also:
-
getOperationHistory
Returns theIOperationHistory
that is used by this entry. It is obtained from the parent in case the entry is not a root entry.- Returns:
- the
IOperationHistory
to be used.
-
getPropertySource
- Overrides:
getPropertySource
in classPropertySheetEntry
-
resetPropertyValue
public void resetPropertyValue()- Specified by:
resetPropertyValue
in interfaceIPropertySheetEntry
- Overrides:
resetPropertyValue
in classPropertySheetEntry
- See Also:
-
setValues
- Specified by:
setValues
in interfaceIPropertySheetEntry
- Overrides:
setValues
in classPropertySheetEntry
-
valueChanged
- Overrides:
valueChanged
in classPropertySheetEntry
- See Also:
-
valueChanged
Update parent entry about change, being encapsulated into the given operation.- Parameters:
child
- The child entry that changed.operation
- An operation encapsulating the change.
-