Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Wrap label in a compartment
Wrap label in a compartment [message #204175] Tue, 02 September 2008 06:05 Go to next message
Eclipse UserFriend
Hello,

i want to wrap my label in RectangleCompartment like the pseudo figure
below.
______________
|... |
|----------- |
|here is the |
|text |
|here is ano |
|ther text |
--------------

The textWrap is set on true in the EditPart, but this has no affection.
Can someone help me?

Currently it looks like this:
______________
|... |
|----------- |
|here is the |
|here is ano |
--------------


Greetings
J. Oelerink
Re: Wrap label in a compartment [message #204956 is a reply to message #204175] Wed, 10 September 2008 05:53 Go to previous messageGo to next message
Eclipse UserFriend
Hello Jörg,

See org.eclipse.gmf.runtime.diagram.ui.editparts.TextCompartment EditPart
- this is an EditPart used to visualize Note figure with text inside it.
I think you can gather ideas from there.

-----------------
Alex Shatalin
Re: Wrap label in a compartment [message #205415 is a reply to message #204175] Fri, 12 September 2008 07:58 Go to previous messageGo to next message
Eclipse UserFriend
You will have to change this in the generated code. Find the EditPart that
has the label in the xxx.diagram project. Go to its createContents method
and add line:
YourLabel.setTextWrap(true)
The textWrap setting in Properties used to work in older versions of GMF
but now it doesn't.
This should work unless the Compartment has something to do with this.
Re: Wrap label in a compartment [message #672380 is a reply to message #205415] Fri, 20 May 2011 17:20 Go to previous messageGo to next message
Eclipse UserFriend
I found this solution helpful and working, but as soon as I re-generate the diagram code the "costumization" is lost! How can I avoid this? I.e., how can I tell Eclipse to do not overwrite the portion of the code I add manually?

Thanks for your help.
Re: Wrap label in a compartment [message #672389 is a reply to message #672380] Fri, 20 May 2011 17:41 Go to previous message
Eclipse UserFriend
Originally posted by:

Am 20.05.2011 23:20, schrieb Plecto:
> I found this solution helpful and working, but as soon as I re-generate
> the diagram code the "costumization" is lost! How can I avoid this?
> I.e., how can I tell Eclipse to do not overwrite the portion of the code
> I add manually?
>
> Thanks for your help.
@generated NOT
Previous Topic:Delete doen't work
Next Topic:Create Connection Buttons next to shape are not working
Goto Forum:
  


Current Time: Sun Aug 31 11:13:06 EDT 2025

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

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

Back to the top