Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing the OpenDiagramBehaviour
Changing the OpenDiagramBehaviour [message #486065] Wed, 16 September 2009 07:44 Go to next message
Eclipse UserFriend
Originally posted by: dennis.freese.gmx.net

Hello all,

I want to modify attributes from the OpenDiagramBehaviour, is that possible?
For example in the Open???DiagramEditPolicy there is a private static
class OpenDiagramCommand with the editor id and the diagram kind.
Theses attributes are protected but I need them in another
OpenDiagramBehaviour, so I wanted to change these modifiers.
I searched for other entries in this newsgroup but unfortunately there
is no entry with this kind of question. Additionally I looked into the
gmfgen file for any possibilities, but without success. Maybe I didn't
see the option?
Or is the only chance to write a dynamic template (I never used them in
the past)? Which way is the common one, if both are possible?

My intention: I have an object (referencing object, non-containment),
which should open the correct diagram (from the referenced object) by
double click.

Thanks for your answers

Dennis
Re: Changing the OpenDiagramBehaviour [message #486180 is a reply to message #486065] Wed, 16 September 2009 15:34 Go to previous messageGo to next message
Alex Shatalin is currently offline Alex ShatalinFriend
Messages: 141
Registered: July 2009
Senior Member
Hello Dennis,

> Or is the only chance to write a dynamic template (I never used them
You can use dynamic templates or modify generated code.

> My intention: I have an object (referencing object, non-containment),
> which should open the correct diagram (from the referenced object) by
> double click.
What's wrong with using "related diagrams" property from .gmfmap model?

-----------------
Alex Shatalin
Re: Changing the OpenDiagramBehaviour [message #486392 is a reply to message #486180] Thu, 17 September 2009 13:26 Go to previous message
Eclipse UserFriend
Originally posted by: dennis.freese.gmx.net

Hello Alex,

see below.

Alex Shatalin schrieb:
> Hello Dennis,
>
>> Or is the only chance to write a dynamic template (I never used them
> You can use dynamic templates or modify generated code.
>
>> My intention: I have an object (referencing object, non-containment),
>> which should open the correct diagram (from the referenced object) by
>> double click.
> What's wrong with using "related diagrams" property from .gmfmap model?

Sorry, I think my description wasn't detailed enough. I have multiple
objects with OpenDiagramBehaviours. Everything works great. Additionally
I have another object which is referencing one of the multiple objects.
When I want to create an OpenDiagramBehaviour for the object (which
references another object) I need the editor id and the diagram kind
from every OpenDiagramBehaviour, to take the correct diagram editor. I
can't take the "related diagrams" feature, because I have multiple
diagram types.

Thanks for the advice to take dynamic templates.

Dennis
Previous Topic:Retrieve properties when loading a diagram
Next Topic:Change color of figure/compartment from editor
Goto Forum:
  


Current Time: Thu Apr 25 12:29:59 GMT 2024

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

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

Back to the top