Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problem with compartments
Problem with compartments [message #235037] Wed, 01 July 2009 21:04 Go to next message
Fabricio Pellegrini is currently offline Fabricio PellegriniFriend
Messages: 36
Registered: July 2009
Member
Hi,

I'm trying to create an element with one compartment like the Topic
element in the Tutorial Part 2, so I followed the Tutorial, it worked well
on the example, but when I tried to do with my own diagram it didn't work,
when I drop some element into my package compartment, I can't move o
resize the element inside the package, they go automatic to the corner of
the compartment when I drop it in the compartment. I tried to change the
layout of my packagefigure but it didn't work either.

In my .graph configuration I used the same of the tutorial. A Figure
Descriptor with a Rounded Rectangle using the Flow Layout False and some
labels.
And I created a Compartment named taskCompartment with my PackageFigure as
Figure.

In the .map, I let the wizard create the package node, and put the other
by my self.

Frist I created a compartment mapping on the Package Node and associate it
with the compartment of .graph.
After that I inserted a Child Reference on the Package Node and a Node
Mapping on it.

On the Child reference I put this:

-Child : Node Mapping <Task/Task>
-Children Feature : EMPTY
-Compartment Feature : Compartment Mapping <taskCompartment>
-Containment Feature : taksReference : Taks
-Referenced Child : EMPTY

On the Task's node:

Element : Task
Diagram Node : Node Task(TaskFigure)
Tool : Creation Tool Task


I'm sure that I miss something, but I didn't find it following the
tutorial again.

I can send by e-mail two screenshots to show what is the problem if you
didn't catch.
Re: Problem with compartments [message #235099 is a reply to message #235037] Thu, 02 July 2009 11:21 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Fabricio,

Try setting "isListLayout" property of corresponding GenCompartment to "false"
in .gmfgen model and regenerate code.

-----------------
Alex Shatalin
Re: Problem with compartments [message #235246 is a reply to message #235099] Fri, 03 July 2009 13:49 Go to previous messageGo to next message
Fabricio Pellegrini is currently offline Fabricio PellegriniFriend
Messages: 36
Registered: July 2009
Member
It's working now.

Thanks

Now I would like to know if I can set a default size to the compartment,
because if I set the flow layout to the package, the compartment appears
too little and i need to find where is it on the figure.
Re: Problem with compartments [message #467856 is a reply to message #235246] Mon, 03 August 2009 08:15 Go to previous messageGo to next message
Sinisa is currently offline SinisaFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Fabricio, Alex
Actually, I have the same problem. If I use Flow Layout, compartment size
is too small. In earlier versions of GMF everything works OK.
I use Eclipse Galileo and GMF 2.2.0.v20090114.

Is this a bug?
Please, I need some workaround.

Regards
Sinisa
Re: Problem with compartments [message #467930 is a reply to message #467856] Mon, 03 August 2009 12:09 Go to previous messageGo to next message
Tobias Lingemann is currently offline Tobias LingemannFriend
Messages: 11
Registered: July 2009
Junior Member
Hi,

I have the same problem.
I don't know if it's a bug or feature, but I use StackLayout as a
workaround.
There's only a label for the name and the compartment in my node.
Now the compartment fills the whole node, so its even possible to add a
sub-node over the label.
But maybe there's a better way.


Best regards,
Tobias


P.S.:
I'm using GMF 2.1.3


Sinisa wrote:

> Hi Fabricio, Alex
> Actually, I have the same problem. If I use Flow Layout, compartment size
> is too small. In earlier versions of GMF everything works OK.
> I use Eclipse Galileo and GMF 2.2.0.v20090114.

> Is this a bug?
> Please, I need some workaround.

> Regards
> Sinisa
Re: Problem with compartments [message #467952 is a reply to message #467856] Mon, 03 August 2009 12:52 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Sinisa,

I think GMF-generated figure code was changed a bit. In order to layout things
properly you have to use corresponding layouts/layout constraints in .gmfgraph
model.
This is not a bug - GMF is generateing a code exactly like it is specified
in .gmfgen model. I suppose in the past a bit different (incorrect) code
was generated.

-----------------
Alex Shatalin
Re: Problem with compartments [message #467953 is a reply to message #467930] Mon, 03 August 2009 12:54 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Tobias,

It's good idea to use different layout in .gmfgraph model. I suppose if it
is important for this figure you have to even add more panes there.. It's
all about properly layouting child figures..

-----------------
Alex Shatalin
Re: Problem with compartments [message #467974 is a reply to message #467952] Mon, 03 August 2009 13:39 Go to previous message
Sinisa is currently offline SinisaFriend
Messages: 10
Registered: July 2009
Junior Member
Tobias, Alex

Thank you guys very much.
Stack Layout working a job for me right now, but still remains a problem
with adding node over the label.
I am relatively new in this GMF story, probably there are many ways to
solve this problem (probably a combination of layouts), but I still don't
know how to do it. I will work on it.
Thank you again.
Sinisa
Previous Topic:Property section problem : unable to load class
Next Topic:How get gmf editor export image when editor closed !
Goto Forum:
  


Current Time: Fri Apr 26 22:17:14 GMT 2024

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

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

Back to the top