Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Select view object after navigation
Select view object after navigation [message #1420009] Tue, 09 September 2014 11:30 Go to next message
Csaba Koncz is currently offline Csaba KonczFriend
Messages: 49
Registered: July 2009
Member
Hi,

Is it possible to select a view of a semantic element after performing navigation?

Using a Navigate action with a Browse expression I can open a representation that contains a view of the selected semantic element.
Is it now possible to select or highlight the view object corresponding to the semantic element that initiated the navigation?

Thank you,
Csaba
Re: Select view object after navigation [message #1420063 is a reply to message #1420009] Tue, 09 September 2014 13:02 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 09/09/2014 13:30, Csaba Koncz a écrit :
> Hi,
>
Hi,

> Is it possible to select a view of a semantic element after performing
> navigation?
>
> Using a Navigate action with a Browse expression I can open a
> representation that contains a view of the selected semantic element.
> Is it now possible to select or highlight the view object corresponding
> to the semantic element that initiated the navigation?

You could make this by calling java code.
Have a look to SessionLinkHelper.activateEditor(IWorkbenchPage,
IStructuredSelection) [1] as starting point, it will be probably useful.

>
> Thank you,
> Csaba
>

[1]
http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/navigator/SessionLinkHelper.java

Regards,

--
Laurent - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Select view object after navigation [message #1420103 is a reply to message #1420063] Tue, 09 September 2014 13:55 Go to previous messageGo to next message
Csaba Koncz is currently offline Csaba KonczFriend
Messages: 49
Registered: July 2009
Member
Hi Laurent,

Thank you for the quick reply.

How can I use the class you mentioned?
Do I need to make my own contribution to the context menu as org.eclipse.sirius.diagram.ui.tools.internal.menu.NavigateToMenuContribution does,
or there is a way to do this from the VSM?

Regards,
Csaba
Re: Select view object after navigation [message #1420110 is a reply to message #1420103] Tue, 09 September 2014 14:04 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 09/09/2014 15:55, Csaba Koncz a écrit :
> Hi Laurent,
>
> Thank you for the quick reply.
>
> How can I use the class you mentioned? Do I need to make my own
> contribution to the context menu as
> org.eclipse.sirius.diagram.ui.tools.internal.menu.NavigateToMenuContribution
> does,
> or there is a way to do this from the VSM?

This class is just an example of selection of DDiagramElement from
semantic elements (amongst others). You have to make your own service
that does what you want. And you can draw inspiration from this class.

>
> Regards,
> Csaba
>


--
Laurent - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Select view object after navigation [message #1420723 is a reply to message #1420110] Wed, 10 September 2014 11:27 Go to previous message
Csaba Koncz is currently offline Csaba KonczFriend
Messages: 49
Registered: July 2009
Member
Hi Laurent,

Thank you for your help. Following your guidance I created my first IExternalJavaAction and added it to a PopupMenu tool.
By combining the Java code of SessionLinkHelper and NavigateToCommand I can now open a named representation and select view corresponding to a semantic element.

Best regards,
Csaba
Previous Topic:Sirius doesn't work with Xtext
Next Topic:Sirius 1.0.1 Prevents Creation of New Ecore Modelling Projects
Goto Forum:
  


Current Time: Thu Apr 25 00:57:58 GMT 2024

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

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

Back to the top