How to traverse diagram as a directed graph [message #193987] |
Fri, 20 June 2008 18:57 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03834 seconds