Hi Paul,
(without having opened your model file:)
I first had similar problem with the layouts. When you want a container
to layout its children along e.g. a GridLayout, then you need to do two
things (some users - as me - omitted the second one ...):
1. Add a 'GridLayout' to the *container* (i.e. the RoundedRuleFigure)
2. Add a 'GridLayoutData' to each of the *children*
Note that you can replace 'GridLayout' and 'GridLayoutData' by e.g.
'FlowLayout' and 'FlowLayoutData'.
Regards,
Martin
ps wrote:
Hi there,
I have attached a project "gmf.test" which contains all the models needed
(all very simple ones). If you could give it a spin and answer some of my
questions? (you need to generate gmf.test.edit and gmf.test.diagram
presumably).
1. When I run the plugins and create a defaut.rule_diagram, the behaviour
is
different than I'd expect. For example, I expect RoundedRuleFigure'd use
FlowLayout to layout its children figures - RuleEntitiesCompartmentFigure
and RuleActionsCompartmentFigure; I expect
RuleEntitiesCompartmentFigure'd
use StackLayout to place RuleEntity. But they are not.
2. I tried to use GridLayout, and the generated code complains about not
being able to result GridLayout in draw2d package.
3. I couldn't direct edit the label for RuleEntity and RuleAction, there
is
an exception thrown:
java.lang.NullPointerException
at
org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy.getDirectEditCommand(LabelDirectEditPolicy.java:90)
I've to admit it's probably due to my limited GMF knowledge but I really
belive it should work, so could you look into it and tell me what's
wrong?
I'd appreciate any help!
Thanks,
Paul