Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » policy troubles
policy troubles [message #210552] Thu, 06 November 2008 11:21 Go to next message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
Hi, I've discovered that I've got an item A in my palette that is meant
to be child B.
Surprisingly, you cannot create A in B from the palette, but you can do
it if hovering over B and waiting for the baloon. The amazing thing is
that in the baloon there's the choice of adding A, and works.

What's the issue, I mean what are the classes involved?
I need to reset it so that I can create normally A als o from its
palette tool!

Thanks a lot.

Paolo Russian
Re: policy troubles [message #210560 is a reply to message #210552] Thu, 06 November 2008 11:23 Go to previous messageGo to next message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
paolo ha scritto:
> Hi, I've discovered that I've got an item A in my palette that is meant
> to be child B.
> Surprisingly, you cannot create A in B from the palette, but you can do
> it if hovering over B and waiting for the baloon. The amazing thing is
> that in the baloon there's the choice of adding A, and works.
>
> What's the issue, I mean what are the classes involved?
> I need to reset it so that I can create normally A als o from its
> palette tool!
>
> Thanks a lot.
>
> Paolo Russian

Let me say the mapping is okay on my opinion.
policy troubles solved (code generation bug?) [message #210568 is a reply to message #210560] Thu, 06 November 2008 11:40 Go to previous messageGo to next message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
paolo ha scritto:
> paolo ha scritto:
>> Hi, I've discovered that I've got an item A in my palette that is
>> meant to be child B.
>> Surprisingly, you cannot create A in B from the palette, but you can
>> do it if hovering over B and waiting for the baloon. The amazing thing
>> is that in the baloon there's the choice of adding A, and works.
>>
>> What's the issue, I mean what are the classes involved?
>> I need to reset it so that I can create normally A als o from its
>> palette tool!
>>
>> Thanks a lot.
>>
>> Paolo Russian
>
> Let me say the mapping is okay on my opinion.


well... er.. maybe this is a bug or something.

this is the generated method that brings up the powers to that widget
palette tool:


/**
* @generated
*/
private ToolEntry createTextBox13CreationTool() {
List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(4);
types.add(ComponentsElementTypes.TextBox_2003);
types.add(ComponentsElementTypes.TextBox_3003);
types.add(ComponentsElementTypes.TextBox_3045);
types.add(ComponentsElementTypes.TextBox_3055);

NodeToolEntry entry = new NodeToolEntry(
Messages.TextBox13CreationTool_title,
Messages.TextBox13CreationTool_desc, types);
entry.setSmallIcon(ComponentsElementTypes
.getImageDescriptor(ComponentsElementTypes.TextBox_2003));
entry.setLargeIcon(entry.getSmallIcon());
return entry;
}



To resolve the issue, I added a

types.add(ComponentsElementTypes.TextBox_3019);

and placed the generated not, but this imho isn't that nice because if
in the future we are to modify the model nearby this tool perhaps we
won't realize there's a "generated not" it at a glance.
Re: policy troubles [message #210584 is a reply to message #210552] Thu, 06 November 2008 11:48 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Paolo,

You have to associate proper NodeMappings with the tool creating "A"/"B"
from .gmftool model.

-----------------
Alex Shatalin
Re: policy troubles [message #210607 is a reply to message #210584] Thu, 06 November 2008 12:44 Go to previous messageGo to next message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
Alex Shatalin ha scritto:
> Hello Paolo,
>
> You have to associate proper NodeMappings with the tool creating "A"/"B"
> from .gmftool model.
>
> -----------------
> Alex Shatalin
>
>


thanks alex, as always, for your quick feedbacks.
Afaik the .gmftool editor let you only specify the palette entries list,
you can only set their default images, Description and Titles. I cannot
see more than that.

+ ToolRegistry
-+ Palette Palette
--+ Tool Group Basic
---+ Creation Tool AAA *
----. Default image
----. Default image
---+ Creation Tool BBB *
----. Default image
----. Default image
---+ Creation Tool CCC *
----. Default image
----. Default image

* in the propsheet you've only got Desc and Title.

Looks like you meant another thing, can you be so kind to tell me so I
can fix it by model and can remove the "generated not"?
Thanks in advance

Paolo Russian
Re: policy troubles [message #210615 is a reply to message #210607] Thu, 06 November 2008 15:28 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Paolo,

Each Node/LinkMapping has associated Tool from the .gmftool model (the reference
is not from tool to the Mapping, but in the opposite direction).
So, you have to inspect .gmfmap model to check if each of *Mappings has appropriate
creation tool associated with it.

-----------------
Alex Shatalin
Re: policy troubles [message #210622 is a reply to message #210615] Thu, 06 November 2008 17:01 Go to previous message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
Alex Shatalin ha scritto:
> Hello Paolo,
>
> Each Node/LinkMapping has associated Tool from the .gmftool model (the
> reference is not from tool to the Mapping, but in the opposite direction).
> So, you have to inspect .gmfmap model to check if each of *Mappings has
> appropriate creation tool associated with it.
>
> -----------------
> Alex Shatalin
>
>

like a charm, many thanks!!

Paolo Russian
Previous Topic:child node creation
Next Topic:Different label icons when loading existing models
Goto Forum:
  


Current Time: Thu Apr 25 19:30:09 GMT 2024

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

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

Back to the top