Package org.eclipse.ui.views.properties
Class PropertyEditingSupport
java.lang.Object
org.eclipse.jface.viewers.EditingSupport
org.eclipse.ui.views.properties.PropertyEditingSupport
A concrete subclass of
EditingSupport
that implements cell editing
support for column-based viewers (such as e.g. TreeViewer
or
TableViewer
) based on an IPropertySourceProvider
,
forwarding requests to the IPropertySource
or
IPropertyDescriptor
for the given property ID.- Since:
- 3.3
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPropertyEditingSupport
(ColumnViewer viewer, IPropertySourceProvider propertySourceProvider, Object propertyID) Creates a new instance to be used with the given viewer, based on the given property source provider and property ID. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Is the cell editableprotected CellEditor
getCellEditor
(Object object) The editor to be shownprotected Object
Get the value to set to the editorprotected void
Sets the new value on the given element.Methods inherited from class org.eclipse.jface.viewers.EditingSupport
getViewer, initializeCellEditorValue, saveCellEditorValue
-
Field Details
-
propertySourceProvider
-
propertyID
-
-
Constructor Details
-
PropertyEditingSupport
public PropertyEditingSupport(ColumnViewer viewer, IPropertySourceProvider propertySourceProvider, Object propertyID) Creates a new instance to be used with the given viewer, based on the given property source provider and property ID.- Parameters:
viewer
- the column viewerpropertySourceProvider
- the property source providerpropertyID
- the property ID
-
-
Method Details
-
canEdit
Description copied from class:EditingSupport
Is the cell editable- Specified by:
canEdit
in classEditingSupport
- Parameters:
object
- the model element- Returns:
- true if editable
-
getCellEditor
Description copied from class:EditingSupport
The editor to be shown- Specified by:
getCellEditor
in classEditingSupport
- Parameters:
object
- the model element- Returns:
- the CellEditor
-
getValue
Description copied from class:EditingSupport
Get the value to set to the editor- Specified by:
getValue
in classEditingSupport
- Parameters:
object
- the model element- Returns:
- the value shown
-
setValue
Description copied from class:EditingSupport
Sets the new value on the given element. Note that implementers need to ensure thatgetViewer().update(element, null)
or similar methods are called, either directly or through some kind of listener mechanism on the implementer's model, to cause the new value to appear in the viewer.Subclasses should overwrite.
- Specified by:
setValue
in classEditingSupport
- Parameters:
object
- the model elementvalue
- the new value
-