Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Multi-line label editor
Multi-line label editor [message #230612] Mon, 18 May 2009 02:54
Thomas Spall is currently offline Thomas SpallFriend
Messages: 29
Registered: July 2009
Junior Member
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: Thu Apr 25 11:35:10 GMT 2024

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

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

Back to the top