public class UndoablePropertySheetEntry extends PropertySheetEntry
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.
FILTER_ID_EXPERT
Constructor and Description |
---|
UndoablePropertySheetEntry(IWorkbenchPart workbenchPart,
IOperationHistory operationHistory,
IUndoContext undoContext)
Constructs a new root entry.
|
Modifier and Type | Method and Description |
---|---|
protected PropertySheetEntry |
createChildEntry() |
void |
dispose() |
protected IOperationHistory |
getOperationHistory()
Returns the
IOperationHistory that is used by this entry. |
protected IPropertySource |
getPropertySource(java.lang.Object object) |
void |
resetPropertyValue() |
void |
setValues(java.lang.Object[] objects) |
protected void |
valueChanged(PropertySheetEntry child) |
protected void |
valueChanged(UndoablePropertySheetEntry child,
ITransactionalOperation operation)
Update parent entry about change, being encapsulated into the given
operation.
|
addPropertySheetEntryListener, applyEditorValue, getBackground, getCategory, getChildEntries, getDescription, getDescriptor, getDisplayName, getEditor, getEditValue, getErrorText, getFilters, getFont, getForeground, getHelpContextIds, getImage, getParent, getValueAsString, getValues, hasChildEntries, refreshFromRoot, removePropertySheetEntryListener, setPropertySourceProvider
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public UndoablePropertySheetEntry(IWorkbenchPart workbenchPart, IOperationHistory operationHistory, IUndoContext undoContext)
workbenchPart
- The IWorkbenchPart
to adapt for an
IPropertySource
, in case no values are provided.operationHistory
- The IOperationHistory
to use.undoContext
- The IUndoContext
to use.protected PropertySheetEntry createChildEntry()
createChildEntry
in class PropertySheetEntry
PropertySheetEntry.createChildEntry()
public void dispose()
dispose
in interface IPropertySheetEntry
dispose
in class PropertySheetEntry
IPropertySheetEntry.dispose()
protected IOperationHistory getOperationHistory()
IOperationHistory
that is used by this entry. It is
obtained from the parent in case the entry is not a root entry.IOperationHistory
to be used.protected IPropertySource getPropertySource(java.lang.Object object)
getPropertySource
in class PropertySheetEntry
public void resetPropertyValue()
resetPropertyValue
in interface IPropertySheetEntry
resetPropertyValue
in class PropertySheetEntry
IPropertySheetEntry.resetPropertyValue()
public void setValues(java.lang.Object[] objects)
setValues
in interface IPropertySheetEntry
setValues
in class PropertySheetEntry
protected void valueChanged(PropertySheetEntry child)
valueChanged
in class PropertySheetEntry
PropertySheetEntry.valueChanged(PropertySheetEntry)
protected void valueChanged(UndoablePropertySheetEntry child, ITransactionalOperation operation)
child
- The child entry that changed.operation
- An operation encapsulating the change.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.