[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] WrapTextCellEditor problem

Hi all,

I've been using WrapTextCellEditor in combination with a WrappingLabel to allow multi-line input for a label.

However, I've discovered that when using WrapTextCellEditor, the editor exhibits a strange behaviour:

1) I double-click the label to begin editing.
2) I delete the existing contents of the label (the feature has a default value).
3) I type a single character, and the editor disappears and the change is committed to the model. I didn't press the ENTER key, so I don't see why this has happened.



Presently, the setManager method of my XXXLabelEditPart is:

protected DirectEditManager getManager() {
if (manager == null) {
setManager(new TextDirectEditManager(this, WrapTextCellEditor.class, SystemEditPartFactory.getTextCellEditorLocator(this)));
}

return manager;
}



If I change the WrapTextCellEditor.class argument to TextCellEditor.class or TextCellEditorEx.class, the odd behaviour is not exhibited (i.e. I think the odd behaviour is specific to WrapTextCellEditor).



Any ideas?

Cheers,
Louis.