Skip to main content



      Home
Home » Modeling » Graphiti » Architecture of Graphiti Diagram Editor
Architecture of Graphiti Diagram Editor [message #1059736] Tue, 21 May 2013 09:04 Go to next message
Eclipse UserFriend
Hi,
I want to create a Graphiti Editor (Diagram A) where the user can create several elements.
Now when I doubleclick on an element, another Graphiti Editor (Diagram B) shall be opened, to model the internals.

1) I created a plug-in along with a DiagramTypeProvider and a DiagramType. This one is for Diagram A


My question now is how shall the architecture of the editor look like?

Should I create another plug-in with DiagramTypeProvider and DiagramType for Diagram B. Or can I just add another DiagramTypeProvider and DiagramType to my existing plug-in?


For the sake of diagram navigation, I saw the "AbstractDrillDownFeature", which pretty much looks like what I want to achive. Would it be the right direction to go? Are there any tutorials / examples for similar projects?

Thanks,
Matthias
Re: Architecture of Graphiti Diagram Editor [message #1059804 is a reply to message #1059736] Tue, 21 May 2013 12:20 Go to previous messageGo to next message
Eclipse UserFriend
Matthias,

While it certainly is possible to have separate editors and open one
from the other, it may be easier for the user to work within one
multi-page editor, with one undo-stack, easier navigation etc. In
addition, having separate editors also means splitting the diagrams in
separate files.

Hallvard

On 21.05.13 06.04, Matthias N wrote:
> Hi,
> I want to create a Graphiti Editor (Diagram A) where the user can create
> several elements.
> Now when I doubleclick on an element, another Graphiti Editor (Diagram
> B) shall be opened, to model the internals.
>
> 1) I created a plug-in along with a DiagramTypeProvider and a
> DiagramType. This one is for Diagram A
>
>
> My question now is how shall the architecture of the editor look like?
>
> Should I create another plug-in with DiagramTypeProvider and DiagramType
> for Diagram B. Or can I just add another DiagramTypeProvider and
> DiagramType to my existing plug-in?
>
>
> For the sake of diagram navigation, I saw the
> "AbstractDrillDownFeature", which pretty much looks like what I want to
> achive. Would it be the right direction to go? Are there any tutorials /
> examples for similar projects?
>
> Thanks,
> Matthias
Re: Architecture of Graphiti Diagram Editor [message #1059921 is a reply to message #1059736] Wed, 22 May 2013 03:58 Go to previous messageGo to next message
Eclipse UserFriend
Matthias,

I cannot provide a clear answer to that, but it depends on what you want to
achieve. Usually splitting up different parts into separate plugins is a
good idea and you will end up with cleaner coding and architecture because
you are forced to think about APIs and reuse...

The AbstractDrillDownFeature would be a way to go, I could also imagine
using a CustomFeature registered as DoubleClickFetaure to start a new
diagram editor.

Michael
Re: Architecture of Graphiti Diagram Editor [message #1060010 is a reply to message #1059921] Wed, 22 May 2013 10:17 Go to previous message
Eclipse UserFriend
Michael,

thanks for your answer. I will go with your solution.

Thanks
Previous Topic:CustomFeature's create & get all Elements
Next Topic:Question about Link Model
Goto Forum:
  


Current Time: Sun Jul 06 05:33:08 EDT 2025

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

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

Back to the top