Package org.eclipse.ui.views.properties
Class PropertyEditingSupport
- java.lang.Object
-
- org.eclipse.jface.viewers.EditingSupport
-
- org.eclipse.ui.views.properties.PropertyEditingSupport
-
public class PropertyEditingSupport extends EditingSupport
A concrete subclass ofEditingSupportthat implements cell editing support for column-based viewers (such as e.g.TreeViewerorTableViewer) based on anIPropertySourceProvider, forwarding requests to theIPropertySourceorIPropertyDescriptorfor the given property ID.- Since:
- 3.3
- See Also:
PropertyColumnLabelProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectpropertyIDprotected IPropertySourceProviderpropertySourceProvider
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEdit(Object object)Is the cell editableprotected CellEditorgetCellEditor(Object object)The editor to be shownprotected ObjectgetValue(Object object)Get the value to set to the editorprotected voidsetValue(Object object, Object value)Sets the new value on the given element.-
Methods inherited from class org.eclipse.jface.viewers.EditingSupport
getViewer, initializeCellEditorValue, saveCellEditorValue
-
-
-
-
Field Detail
-
propertySourceProvider
protected IPropertySourceProvider propertySourceProvider
-
propertyID
protected Object propertyID
-
-
Constructor Detail
-
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 Detail
-
canEdit
protected boolean canEdit(Object object)
Description copied from class:EditingSupportIs the cell editable- Specified by:
canEditin classEditingSupport- Parameters:
object- the model element- Returns:
- true if editable
-
getCellEditor
protected CellEditor getCellEditor(Object object)
Description copied from class:EditingSupportThe editor to be shown- Specified by:
getCellEditorin classEditingSupport- Parameters:
object- the model element- Returns:
- the CellEditor
-
getValue
protected Object getValue(Object object)
Description copied from class:EditingSupportGet the value to set to the editor- Specified by:
getValuein classEditingSupport- Parameters:
object- the model element- Returns:
- the value shown
-
setValue
protected void setValue(Object object, Object value)
Description copied from class:EditingSupportSets 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:
setValuein classEditingSupport- Parameters:
object- the model elementvalue- the new value
-
-