Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Multi-line label editor
Multi-line label editor [message #230612] Sun, 17 May 2009 22:54
Eclipse UserFriend
I have diagram elements with WrappingLabels that are actually supposed to
really wrap the text which is displayed on them, i.e. I do
'myWrappingLabel.setTextWrap(true);'.

In the corresponding EditPart I overwrote the getManager() method:
protected DirectEditManager getManager() {
if (manager == null) {
setManager(new TextDirectEditManager(this,
WrapTextCellEditor.class,
CompModellingEditPartFactory.getTextCellEditorLocator(this)) );
}
return manager;
}

However, this results in a very weird behaviour of the diagram element,
when I click on it to bring it into direct edit mode: on typing the first
character into the editor field, the editor field closes and the typed
character is committed as new value into the WrappingLabelText.
If I use TextCellEditorEx.class instead of the WrapTextCellEditor.class
as parameter, the editing works fine, but of course I don't have only a
single editor line of text when going into direct edit mode, i.e. while
typing the text disappears on the left out of the editor line.

Any idea what causes this? Did I forget to change something in some other
class?
Previous Topic:What's the difference between Metamodel Type and Specialization Type?
Next Topic:Constraint for mapping two GMF elements to a singe Domain object
Goto Forum:
  


Current Time: Wed May 07 12:00:04 EDT 2025

Powered by FUDForum. Page generated in 0.03483 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top