|
Re: Display Selection Wizard at Java Service [message #1697906 is a reply to message #1697873] |
Tue, 09 June 2015 14:01 |
|
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 #1698041 is a reply to message #1698012] |
Wed, 10 June 2015 14:54 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03711 seconds