[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Custom Layout in Compartment

Hi Alex,

thanks that you tried that out! I also made a protoype for that, but the 
result is not like intended.
The diagram uses recursion in the gmfmap, childReference.referencedChild 
points to my node again, so I can add more children in every compartment.

The figures are very simple: A main rectangle, a label for the name and a 
rectangle for the compartment. I define the compartment then with accessor 
to that rectangle.

In the generated code I replaced the createFigure in the compartmentEditPart 
just like you wrote.

Without adding a LayoutEditPolicy I can not add any nodes in the 
compartment, so I added a fake OrderedLayoutEditPolicy that returns empty 
commands.

Now I can add the nodes in the compartments, but they get use the complete 
space in the compartment, so only one node per compartment is visible.

It seems to be that the "calculatePreferredSize" of the StackLayout is never 
called.

Could you explain me how you got your example working?

Cheers
Balthasar