public class PropertyEditingSupport extends EditingSupport
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.PropertyColumnLabelProvider
Modifier and Type | Field and Description |
---|---|
protected Object |
propertyID |
protected IPropertySourceProvider |
propertySourceProvider |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEdit(Object object)
Is the cell editable
|
protected CellEditor |
getCellEditor(Object object)
The editor to be shown
|
protected Object |
getValue(Object object)
Get the value to set to the editor
|
protected void |
setValue(Object object,
Object value)
Sets the new value on the given element.
|
getViewer, initializeCellEditorValue, saveCellEditorValue
protected IPropertySourceProvider propertySourceProvider
protected Object propertyID
public PropertyEditingSupport(ColumnViewer viewer, IPropertySourceProvider propertySourceProvider, Object propertyID)
viewer
- the column viewerpropertySourceProvider
- the property source providerpropertyID
- the property IDprotected boolean canEdit(Object object)
EditingSupport
canEdit
in class EditingSupport
object
- the model elementprotected CellEditor getCellEditor(Object object)
EditingSupport
getCellEditor
in class EditingSupport
object
- the model elementprotected Object getValue(Object object)
EditingSupport
getValue
in class EditingSupport
object
- the model elementprotected void setValue(Object object, Object value)
EditingSupport
getViewer().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.
setValue
in class EditingSupport
object
- the model elementvalue
- the new value
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.