Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Display Selection Wizard at Java Service
Display Selection Wizard at Java Service [message #1697873] Tue, 09 June 2015 09:51 Go to next message
Huy Le is currently offline Huy LeFriend
Messages: 18
Registered: November 2014
Junior Member
Hello,

I defined a Selection Wizard.

I would like to open it from Java Service call, for example when click on a popup menu.

How can i do that?

Thanks.
Huy.
Re: Display Selection Wizard at Java Service [message #1697906 is a reply to message #1697873] Tue, 09 June 2015 14:01 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

For the Java Service call, you have two solutions:
- you write a simple java class with your service in it. In your VSM,
you only need to declare the java class as a Java Extension (sub element
of the Representation Description element (i.e. diagram description). In
your service you can directly call the service in the interpreted
expressions. You can find more information about Java Services[1] on the
online documentation.
- you can declare a java extension using the
"org.eclipse.sirius.externalJavaAction". This way you can execute the
service using an operation External Java Action Call (instead of using
the java method name in the interpreted expressions). You can find more
information about External Java Action[2] on the online documentation.

For the Selection Wizard part, it should be called by your java service.
The code you want to call is
"org.eclipse.sirius.common.ui.tools.api.selection.EObjectSelectionWizard" and
"org.eclipse.sirius.common.ui.tools.api.selection.page.EObjectSelectionWizardPage".
You can find examples in
"org.eclipse.sirius.diagram.ui.tools.internal.commands.emf.SelectionWizardCommand".

Regards,
Steve
[1]
https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods
[2]
https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#extensions

Le 09/06/2015 11:51, Huy Le a écrit :
> Hello,
>
> I defined a Selection Wizard.
> I would like to open it from Java Service call, for example when click
> on a popup menu.
>
> How can i do that?
>
> Thanks.
> Huy.


--
Steve Monnier - Obeo

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


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Display Selection Wizard at Java Service [message #1698012 is a reply to message #1697906] Wed, 10 June 2015 11:22 Go to previous messageGo to next message
Huy Le is currently offline Huy LeFriend
Messages: 18
Registered: November 2014
Junior Member
Hello Steve,

I would like to give more detail on the issue.

- The wizard is defined in .odesign
- Several entry points need to re-use the same wizard suche as popup menu A, popup menu B, via Palette tool,.etc..

The question is: How to retrieve or to reuse the Wizard already defined in .odesign?

Thanks.
Huy.

Re: Display Selection Wizard at Java Service [message #1698041 is a reply to message #1698012] Wed, 10 June 2015 14:54 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello Huy,

You cannot call a Selection Wizard Tool from an operation of another
tool (popup or palette). This is why I think you should have a java
service either as a Java Extension or an External Java Action that calls
this wizard (cf my previous reply). This way you will be able to reuse
the same wizard in many tools.

Regards,
Steve

Le 10/06/2015 13:22, Huy Le a écrit :
> Hello Steve,
>
> I would like to give more detail on the issue.
>
> - The wizard is defined in .odesign
> - Several entry points need to re-use the same wizard suche as popup
> menu A, popup menu B, via Palette tool,.etc..
>
> The question is: How to retrieve or to reuse the Wizard already defined
> in .odesign?
>
> Thanks.
> Huy.
>
>


--
Steve Monnier - Obeo

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


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Conditions sur des valeurs
Next Topic:Edit semantic model programmatically
Goto Forum:
  


Current Time: Fri Apr 19 22:50:01 GMT 2024

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

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

Back to the top