Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Change dynamicaly Figure for Link or Node
Change dynamicaly Figure for Link or Node [message #96226] Wed, 24 January 2007 14:04 Go to next message
Eclipse UserFriend
Hi all,

I want to know if it's possible to change the Figure of an element (link
or node) without destroy and recreate it.

For example in a diagram when I change the type of a link I want that
the figure changes automatically (type EXTENDS = dash arrow , type
INCLUDES = solid arrow, etc...)

Thanks in advance,


Hugues
Re: Change dynamicaly Figure for Link or Node [message #96618 is a reply to message #96226] Thu, 25 January 2007 06:40 Go to previous messageGo to next message
Eclipse UserFriend
Hello Hugues_Rérolle,

Currently this functionality is not supported by generated code, so you have
to write it manually - you can add a listener to the underlying semantic/notation
model element and change figure in accordance.

-----------------
Alex Shatalin
Re: Change dynamicaly Figure for Link or Node [message #96808 is a reply to message #96226] Thu, 25 January 2007 09:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Hugues,

Currently, support for this is only generated in the lite runtime. You would
need to define several node (or link) mappings with different visual
representations,
associate each with a constraint and a feature seq initializer (constraints
should be mutually inclusive and collectively exhaustive, and the feature
seq initializers should
initialize the elements to match the corresponding constraint). An example
of such a makeup for a link can be found in the MindMap example.

Best regards,
Boris Blajer


"Hugues R
Re: Change dynamicaly Figure for Link or Node [message #96851 is a reply to message #96618] Thu, 25 January 2007 10:38 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alex,

Thanks for your response, I'll do that manually.


Regards,

Hugues Rérolle
Re: Change dynamicaly Figure for Link or Node [message #96894 is a reply to message #96808] Thu, 25 January 2007 10:51 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your answers Boris,


I did the mindmap tutorial, and It's not exactly that I want to do.
Because it's impossible to convert a link to another link, you have to
destroy and recreate It...

But Alex Shatalin has given the answer:
news://news.eclipse.org:119/3c3172e6f4928c90e951d3b33ff@news .eclipse.org


Best regards,


Hugues Rerolle






Boris Blajer a écrit :
> Hi Hugues,
>
> Currently, support for this is only generated in the lite runtime. You would
> need to define several node (or link) mappings with different visual
> representations,
> associate each with a constraint and a feature seq initializer (constraints
> should be mutually inclusive and collectively exhaustive, and the feature
> seq initializers should
> initialize the elements to match the corresponding constraint). An example
> of such a makeup for a link can be found in the MindMap example.
>
> Best regards,
> Boris Blajer
>
>
> "Hugues Rérolle" <yougze@free.fr> wrote in message
> news:ep8akg$mkr$1@utils.eclipse.org...
>> Hi all,
>>
>> I want to know if it's possible to change the Figure of an element (link
>> or node) without destroy and recreate it.
>>
>> For example in a diagram when I change the type of a link I want that the
>> figure changes automatically (type EXTENDS = dash arrow , type INCLUDES =
>> solid arrow, etc...)
>>
>> Thanks in advance,
>>
>>
>> Hugues
>
>
Re: Change dynamicaly Figure for Link or Node [message #96912 is a reply to message #96894] Thu, 25 January 2007 11:41 Go to previous messageGo to next message
Eclipse UserFriend
Hello Hugues,

> But Alex Shatalin has given the answer:
> news://news.eclipse.org:119/3c3172e6f4928c90e951d3b33ff@news .eclipse.o
> rg

As Boris mentioned, my answer is valid for _runtime_based_ generated code.
In addition to it GMF support _lite_ diagram code generation ( http://wiki.eclipse.org/index.php/GMF_Tutorial_Part_4#Lite_R untime_Generation_to_RCP).
So, if you need this updating functionality you can try lite code generation
- corresponding feature is implemented there AFAIK.

-----------------
Alex Shatalin
Re: Change dynamicaly Figure for Link or Node [message #99152 is a reply to message #96912] Tue, 30 January 2007 13:36 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex & Boris,


I'm interested by the lite diagram code generation. But I have some
execution problem when I generate the pure GEF-diagram code (I can't add
node in the diagram...), but it's another problem.

Thanks again to both of you.


Hugues



Alex Shatalin a écrit :
> Hello Hugues,
>
>> But Alex Shatalin has given the answer:
>> news://news.eclipse.org:119/3c3172e6f4928c90e951d3b33ff@news .eclipse.o
>> rg
>
> As Boris mentioned, my answer is valid for _runtime_based_ generated
> code. In addition to it GMF support _lite_ diagram code generation
> ( http://wiki.eclipse.org/index.php/GMF_Tutorial_Part_4#Lite_R untime_Generation_to_RCP).
> So, if you need this updating functionality you can try lite code
> generation - corresponding feature is implemented there AFAIK.
>
> -----------------
> Alex Shatalin
>
>
Re: Change dynamicaly Figure for Link or Node [message #99223 is a reply to message #99152] Tue, 30 January 2007 16:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi Hugues,

What exactly is your execution problem in the lite version? Do you have any
stacktrace or any other manifestation of what is going wrong?

Best regards,
Boris

"Hugues Rerolle" <yougze@free.fr> wrote in message
news:epo38b$rdl$1@utils.eclipse.org...
> Hi Alex & Boris,
>
>
> I'm interested by the lite diagram code generation. But I have some
> execution problem when I generate the pure GEF-diagram code (I can't add
> node in the diagram...), but it's another problem.
>
> Thanks again to both of you.
>
>
> Hugues
>
>
>
> Alex Shatalin a ecrit :
>> Hello Hugues,
>>
>>> But Alex Shatalin has given the answer:
>>> news://news.eclipse.org:119/3c3172e6f4928c90e951d3b33ff@news .eclipse.o
>>> rg
>>
>> As Boris mentioned, my answer is valid for _runtime_based_ generated
>> code. In addition to it GMF support _lite_ diagram code generation
>> ( http://wiki.eclipse.org/index.php/GMF_Tutorial_Part_4#Lite_R untime_Generation_to_RCP).
>> So, if you need this updating functionality you can try lite code
>> generation - corresponding feature is implemented there AFAIK.
>>
>> -----------------
>> Alex Shatalin
>>
>>
>
Re: Change dynamicaly Figure for Link or Node [message #99333 is a reply to message #99223] Tue, 30 January 2007 18:32 Go to previous message
Eclipse UserFriend
Boris Blajer a écrit :

>
> What exactly is your execution problem in the lite version? Do you have any
> stacktrace or any other manifestation of what is going wrong?
>

Hi Boris,

I found the problem, I forgot to clear both options "Use ImapMode" and
"utilize enhanced features of GMF runtime" ;).

Sorry for my lack of understanding.

Regards,

Hugues
Previous Topic:Canonical Edit Policy not being called ?
Next Topic:moving attributes
Goto Forum:
  


Current Time: Tue May 13 17:57:15 EDT 2025

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

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

Back to the top