Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Unexpected layout of elements inside Component
Unexpected layout of elements inside Component [message #548720] Thu, 22 July 2010 18:03 Go to next message
Eclipse User
Originally posted by: harrisb.ociweb.com

Hello,

I'm trying to use the UML2Tool's Component diagram element defined in
componentDiagram_classifiers.gmfgraph with my own mapping. When I do
this the elements inside the component stack on top of each other with
each element nearly the same width as the component. By contrast, when I
create a component using UML2Tools, I can place elements anywhere inside
the component with any size.

In other words, the layout for a Component using UML2Tools appears to be
using the GMF XY Layout. However, inspecting the graphical definition
model I looks like a custom border is used for the figure that
corresponds to the compartment holding the component elements.

I concluding this by looking in project org.eclipse.uml2.diagram.def
graphical definition model found in
structures/componentDiagram_classifiers.gmfgraph. For figure
ComponentFigure_Body used by the compartment the custom layout
org.eclipse.gmf.runtime.draw2d.ui.figures.OneLineBorder is used. Is this
the reason the elements I'm putting in the component just stack up? I
would have expected that XY Layout would be used.

Can someone help explain why I can't position my elements anywhere in
the component?

Thanks,
Byron Harris
Re: Unexpected layout of elements inside Component [message #551735 is a reply to message #548720] Mon, 09 August 2010 11:57 Go to previous messageGo to next message
Christian Waniek is currently offline Christian Waniek
Messages: 50
Registered: May 2010
Member
Hello

sometimes it helps to inspect the gmfgen-file (the generator model). Because here you also have the possibility to make some changes. You mustn't use it as it is. As long as you only overwrite the gmfgen all previously made manual changes remain in this file. So maybe you'll find here the answer to your question.

Else I would look at the code: Maybe there's some custom code (besides the OneLineBorder) which does the job.

Regards
Christian Waniek
Re: Unexpected layout of elements inside Component [message #551834 is a reply to message #551735] Mon, 09 August 2010 17:09 Go to previous message
Eclipse User
Originally posted by: harrisb.ociweb.com

Hi Christian,

Yes, I eventually found out there was a setting for my compartment's
listlayout that was set to “true” in the .gmfgen file that was
overriding the layout setting in the graphic definition model. Once I
set listlayout to "false" I got the behavior I was expecting.

I wonder why listlayout is needed?

Byron

Christian Waniek wrote:
> Hello
>
> sometimes it helps to inspect the gmfgen-file (the generator model).
> Because here you also have the possibility to make some changes. You
> mustn't use it as it is. As long as you only overwrite the gmfgen all
> previously made manual changes remain in this file. So maybe you'll find
> here the answer to your question.
>
> Else I would look at the code: Maybe there's some custom code (besides
> the OneLineBorder) which does the job.
>
> Regards
> Christian Waniek
Re: Unexpected layout of elements inside Component [message #625888 is a reply to message #548720] Mon, 09 August 2010 11:57 Go to previous message
Christian Waniek is currently offline Christian Waniek
Messages: 50
Registered: May 2010
Member
Hello

sometimes it helps to inspect the gmfgen-file (the generator model). Because here you also have the possibility to make some changes. You mustn't use it as it is. As long as you only overwrite the gmfgen all previously made manual changes remain in this file. So maybe you'll find here the answer to your question.

Else I would look at the code: Maybe there's some custom code (besides the OneLineBorder) which does the job.

Regards
Christian Waniek
Re: Unexpected layout of elements inside Component [message #625959 is a reply to message #551735] Mon, 09 August 2010 17:09 Go to previous message
Eclipse User
Originally posted by: harrisb.ociweb.com

Hi Christian,

Yes, I eventually found out there was a setting for my compartment's
listlayout that was set to “true” in the .gmfgen file that was
overriding the layout setting in the graphic definition model. Once I
set listlayout to "false" I got the behavior I was expecting.

I wonder why listlayout is needed?

Byron

Christian Waniek wrote:
> Hello
>
> sometimes it helps to inspect the gmfgen-file (the generator model).
> Because here you also have the possibility to make some changes. You
> mustn't use it as it is. As long as you only overwrite the gmfgen all
> previously made manual changes remain in this file. So maybe you'll find
> here the answer to your question.
>
> Else I would look at the code: Maybe there's some custom code (besides
> the OneLineBorder) which does the job.
>
> Regards
> Christian Waniek
Previous Topic:help to extend uml2tools with new diagrams
Next Topic:Viewing unregistered UML2 model
Goto Forum:
  


Current Time: Fri Oct 31 10:55:49 GMT 2014

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

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