public class UndoablePropertySheetEntry
extends org.eclipse.ui.views.properties.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.
Constructor and Description |
---|
UndoablePropertySheetEntry(org.eclipse.ui.IWorkbenchPart workbenchPart,
org.eclipse.core.commands.operations.IOperationHistory operationHistory,
org.eclipse.core.commands.operations.IUndoContext undoContext)
Constructs a new root entry.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.ui.views.properties.PropertySheetEntry |
createChildEntry() |
void |
dispose() |
protected org.eclipse.core.commands.operations.IOperationHistory |
getOperationHistory()
Returns the
IOperationHistory that is used by this entry. |
protected org.eclipse.ui.views.properties.IPropertySource |
getPropertySource(java.lang.Object object) |
void |
resetPropertyValue() |
void |
setValues(java.lang.Object[] objects) |
protected void |
valueChanged(org.eclipse.ui.views.properties.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
public UndoablePropertySheetEntry(org.eclipse.ui.IWorkbenchPart workbenchPart, org.eclipse.core.commands.operations.IOperationHistory operationHistory, org.eclipse.core.commands.operations.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 org.eclipse.ui.views.properties.PropertySheetEntry createChildEntry()
createChildEntry
in class org.eclipse.ui.views.properties.PropertySheetEntry
PropertySheetEntry.createChildEntry()
public void dispose()
dispose
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
dispose
in class org.eclipse.ui.views.properties.PropertySheetEntry
IPropertySheetEntry.dispose()
protected org.eclipse.core.commands.operations.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 org.eclipse.ui.views.properties.IPropertySource getPropertySource(java.lang.Object object)
getPropertySource
in class org.eclipse.ui.views.properties.PropertySheetEntry
public void resetPropertyValue()
resetPropertyValue
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
resetPropertyValue
in class org.eclipse.ui.views.properties.PropertySheetEntry
IPropertySheetEntry.resetPropertyValue()
public void setValues(java.lang.Object[] objects)
setValues
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
setValues
in class org.eclipse.ui.views.properties.PropertySheetEntry
protected void valueChanged(org.eclipse.ui.views.properties.PropertySheetEntry child)
valueChanged
in class org.eclipse.ui.views.properties.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.