Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to programmatically Highlight an Node in Sirius Diagram representation
How to programmatically Highlight an Node in Sirius Diagram representation [message #1796976] Tue, 23 October 2018 12:37 Go to next message
Divya Patel is currently offline Divya PatelFriend
Messages: 7
Registered: July 2018
Junior Member
Hi All,

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.
Re: How to programmatically Highlight an Node in Sirius Diagram representation [message #1797095 is a reply to message #1796976] Thu, 25 October 2018 07:58 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi,

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.

Regards,

Florian
Previous Topic:[OBEO] Create element based edge tool
Next Topic:problem in synchronizing
Goto Forum:
  


Current Time: Thu Apr 25 03:47:24 GMT 2024

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

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

Back to the top