|
Re: Create a fugure automatically [message #646296 is a reply to message #646222] |
Thu, 23 December 2010 08:23 |
Eclipse User |
|
|
|
Originally posted by: marius.groeger.googlemail.com
On 22.12.2010 19:01, Elhamlaoui Mahmoud wrote:
> Hi,
>
> I wonder if there is a way to hide the line that is always displayed
> inside a container?
Add a setBorder(null) for the Figure of the edit part in question.
Regards
Marius
|
|
|
|
|
Re: Create a fugure automatically [message #646358 is a reply to message #646339] |
Thu, 23 December 2010 13:13 |
Eclipse User |
|
|
|
Originally posted by: marius.groeger.googlemail.com
On 23.12.2010 13:12, ralph. wrote:
> Hi,
>
> I changed the method createFigure of the compartments EditPart to:
>
>
> /**
> * @generated NOT
> */
> public IFigure createFigure() {
> ResizableCompartmentFigure result = (ResizableCompartmentFigure)
> super.createFigure();
> result.setTitleVisibility(false);
> //changed code
> result.setBorder(null);
> return result;
> }
>
> That works great! But is there a way to achieve this using the gmfgraph
> model?
Not that I know of. To alter the impementation of EditParts I'm not
using a custom EditPart provider, see the "gmfgraph -> Node -> Content
Pane" thread for details.
|
|
|
|
|
|
|
|
Re: Create a fugure automatically [message #647037 is a reply to message #646889] |
Tue, 04 January 2011 09:03 |
Eclipse User |
|
|
|
Originally posted by: marius.groeger.googlemail.com
On 02.01.2011 16:23, ralph. wrote:
> I have this custom template is there a better way to do it?
You could consider using an custom EditPartProvider as an overlay to the
generated one. This way you can extend the generated Java edit part
class and override what you need to.
+ modification can be better maintained, since on the Java level
+ probably easier to migrate to a new GMF version
- doesn't work well for multiple edit parts sharing the same modification
- doesn't survive drastic model changes such as news names, classes etc.
Regards
Marius
|
|
|
|
Re: Create a fugure automatically [message #647139 is a reply to message #647112] |
Tue, 04 January 2011 17:18 |
Eclipse User |
|
|
|
Originally posted by: marius.groeger.googlemail.com
On 04.01.2011 17:25, ralph. wrote:
> «targetDef.proceed()» executes the original template definition. This
> will make it easier to migrate to a new GMF version as for all edit
> parts that do not match my condition the default template code is executed.
Definitely a good idea.
Just to note - when I was mentioning migration issues I was more
referring to the overall structure of the Xpand template code you hook
into.
Regards
Marius
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05679 seconds