Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to programmatically Highlight an Node in Sirius Diagram representation
https://www.eclipse.org/forums/index.php/mv/msg/1095773/1796976/#msg_1796976
I am using Double click listener event in eclipse Error Log. When this event will active then it should highlight the corresponding node in DDiagramEditorImpl class(also Focus on that element in Model Explorer).
From org.eclipse.ui.navigator.CommonViewer class I am trying to focus the node.
1>commonViewer.getControl().setFocus();
Here, setFocus() is retruning true but still node is not highlighted.
2>commonViewer.setSelection(new StructuredSelection(element), true);
setSelection() is internally returning null value.
Above both method are not working any other ways to highlight the element and Node.
]]>Divya Patel2018-10-23T12:37:02-00:00Re: How to programmatically Highlight an Node in Sirius Diagram representation
https://www.eclipse.org/forums/index.php/mv/msg/1095773/1797095/#msg_1797095
You can take a look on the class org.eclipse.sirius.ui.tools.internal.views.modelexplorer.SiriusDialectLinkWithEditorSelectionListener which is responsible for the link with selection feature. When selecting a model element in the model explorer, the corresponding graphical element is selected in the opened representation.