[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Re: Couple questions related with GMF

Hi Martin,
Yes, I'm aware of that. The issue I had is when I generate the diagram code 
using GridLayout in RoundedRuleFigure, I always get a compilation error in 
RuleEditPart about this line:
org.eclipse.gmf.internal.codegen.draw2d.GridLayout myGenLayoutManager = new 
org.eclipse.gmf.internal.codegen.draw2d.GridLayout();

Basicly GridLayout can't be resolved.

So if you can use GridLayout, then that means the generation code works fine 
for you, that's something I don't understand.

Thanks for your response!

Paul



"Martin Herbort" <martinherbort@xxxxxx> wrote in message 
news:e98b4s$t59$1@xxxxxxxxxxxxxxxxxxxx
>
> 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
>>
>>