Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » propagating selections/selected state
propagating selections/selected state [message #674017] Wed, 25 May 2011 14:02 Go to next message
Eclipse UserFriend
Originally posted by: rbenjamin

for a tree of nodes, I'd like to select not only a node but also its
outbound connections and their endpoint nodes, and so on. Obviously
need to detect cycles. I have found no example of this. Any ideas?

Re: propagating selections/selected state [message #674266 is a reply to message #674017] Thu, 26 May 2011 11:11 Go to previous message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

List<?> objectToCycle = new ArrayList<?>;
List<ShapeNodeEditPart> editParts = (List<ShapeNodeEditPart>) diagramEditPart.getChildren();

editorPart = (DiagramDocumentEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
diagramWorkbenchPart = (IDiagramWorkbenchPart) editorPart;
for (ShapeNodeEditPart part : editParts) {
if(((View) part.getModel()).getElement() == objectToCycle ){

HTH, bye

Previous Topic:Display editor within node
Next Topic:How to create nodes programmatically?
Goto Forum:

Current Time: Wed Jun 20 11:47:14 GMT 2018

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

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

Back to the top