Custom cell editor in property sheet [message #220324] |
Sun, 01 March 2009 17:18  |
Eclipse User |
|
|
|
Hello
I'm trying to implement a custom celleditor for my own datatype. I want it
to appear in property sheet of one of the objects.
I've been following a short tutorial that can be found at:
http://www.jevon.org/wiki/Using_EDataTypes_in_GMF
So I've implemented my own CustomizedPropertyDescriptor and put there code
like this:
public CellEditor createPropertyEditor(Composite composite) {
if (dataType.equals(DeploymentPackage.eINSTANCE.getMyType())) {
...
return new ExtendedComboBoxCellEditor(composite, new
ArrayList<Object>(choiceOfValues), getEditLabelProvider(),
itemPropertyDescriptor.isSortChoices(object))
}
return super.createPropertyEditor(composite);
}
I get values for that particular CellEditor from some place, they appear
correctly in the editor and I can iterate through them. However I can't
select any of them - they become null. This weird behavior is cause by
UndoableModelPropertySheetEntry.applyEditorValue() and most of all this
function's ending:
...
else if (!editValue.equals(newValue))
changed = true;
// Set the editor value
if (changed)
setValue(newValue);
changed is never set to true, because editValue actually equals newValue.
Any ideas?
Marcin
|
|
|
|
Powered by
FUDForum. Page generated in 0.03027 seconds