Skip to main content



      Home
Home » Eclipse Projects » Sirius » Select view object after navigation
Select view object after navigation [message #1420009] Tue, 09 September 2014 07:30 Go to next message
Eclipse UserFriend
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 09:02 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Select view object after navigation [message #1420103 is a reply to message #1420063] Tue, 09 September 2014 09:55 Go to previous messageGo to next message
Eclipse UserFriend
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 10:04 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Select view object after navigation [message #1420723 is a reply to message #1420110] Wed, 10 September 2014 07:27 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 18:55:10 EDT 2025

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

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

Back to the top