Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to traverse diagram as a directed graph
How to traverse diagram as a directed graph [message #193987] Fri, 20 June 2008 18:57 Go to next message
Eclipse UserFriend
Originally posted by: zoltan.sepsy.gmail.com

Greets
My task is to map a series of operations to the diagram elements, in order
to model sequential/concurrent behavour of some problem. I have made the
editor working, now I would like to traverse the diagram through the
connections while identifying the nodes. Could someone explain to me where
can I do this?
Thanks,
Zoli
Re: How to traverse diagram as a directed graph [message #193999 is a reply to message #193987] Fri, 20 June 2008 23:49 Go to previous message
Eclipse UserFriend
Originally posted by: zoltan.sepsy.gmail.com

I have already solved the task.
For those who already have this problem: Try this code snippet to access
the diagram root element

***DiagramEditor editor = ((***DiagramEditor) PlatformUI
.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().getActiveEditor());

Diagram diagram = editor.getDiagram();

And diagram.getElement() to access your root model element.


Zoltan
Previous Topic:Pen sketching?
Next Topic:Context Menus
Goto Forum:
  


Current Time: Sat Apr 20 02:28:46 GMT 2024

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

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

Back to the top