Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to get the diagram programatically
How to get the diagram programatically [message #1226672] Thu, 02 January 2014 11:08 Go to next message
Epi Liptik is currently offline Epi LiptikFriend
Messages: 8
Registered: November 2013
Junior Member
Hello,,
I didn't find how to get the diagram programatically (the edit part or the object from the model), any ideas? Is it possible?
Re: How to get the diagram programatically [message #1228882 is a reply to message #1226672] Wed, 08 January 2014 09:17 Go to previous messageGo to next message
Epi Liptik is currently offline Epi LiptikFriend
Messages: 8
Registered: November 2013
Junior Member
I finally found a way :
DiagramEditor d = (DiagramEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
List<EditPart> children = d.getDiagramEditPart().getChildren();
Re: How to get the diagram programatically [message #1232145 is a reply to message #1228882] Thu, 16 January 2014 10:04 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

there could be a better way to do this. From where do you call this code?

Ralph
Re: How to get the diagram programatically [message #1233711 is a reply to message #1232145] Mon, 20 January 2014 10:16 Go to previous message
Epi Liptik is currently offline Epi LiptikFriend
Messages: 8
Registered: November 2013
Junior Member
I call this code from a class inherited from AbstractHandler, into the method execute (ExecutionEvent event)
Previous Topic:GMF Diagram Properties Error
Next Topic:Remove dangling references when link is deleted
Goto Forum:
  


Current Time: Tue Apr 23 13:57:54 GMT 2024

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

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

Back to the top