Bug 526844 - How to write and use Sirius services without building plugins & launching a runtime Eclipse
Summary: How to write and use Sirius services without building plugins & launching a r...
Status: UNCONFIRMED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 5.1.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2017-11-04 15:01 EDT by Nicolas Rouquette CLA
Modified: 2017-11-17 09:18 EST (History)
1 user (show)

See Also:


Attachments
Illustration of the workaround (189.03 KB, image/png)
2017-11-17 09:18 EST, Pierre-Charles David CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Rouquette CLA 2017-11-04 15:01:59 EDT
See (E) in this issue: https://github.com/JPL-IMCE/gov.nasa.jpl.imce.oml/issues/142
Comment 1 Pierre-Charles David CLA 2017-11-17 09:14:44 EST
Hi.

Thanks for the feedback. I'm reproducing the original issue here to make the ticket self-contained:

========================
It is unclear from the Sirius Writing Queries doc whether it is possible to do the following:
* In an RCP environment like the OML Workbench -- that is, not launching a runtime eclipse
* use existing viewpoints (e.g., the OML Viewpoints in the OML Workbench)
* allow a user to author new services to simplify writing queries
========================

Queries in Sirius (and the associated Java services support) are meant to be used by specifiers to help the creation of VSMs. In this context executing Java services which are present in the workspace (without launching a runtime) is supported (when using AQL or service:), but this is a convenience to help during modeler development.

From what I understand of your request (and with bug #526843 in mind), your end-users of an already built and packaged/installed modeler write complex queries directly in the "Interpreter" view, and would like to be able to write Java code   in the workspace to make these more convenient. Is that correct?

Both the support for Java services and, actually, the "Interpreter" view itself were designed as "design-time" tools, and not targeted at all to the actual end-users of modelers, so this is not currently explicitly supported.

I can think of a workaround that works right now:
* In the end-user workspace, create a new Viewpoint Specification Project, with a single viewpoint definition.
* The wizard will create a Services class and register it inside the viewpoint.
* In your Sirius sessions, make sure the new viewpoint is enabled.
* When the selection is an element from the session in question, the services defined in the "Services.java" class in the workspace can be used by expressions in the "Interpreter" view.

See the attached screenshot if the description is not clear enough.
Comment 2 Pierre-Charles David CLA 2017-11-17 09:18:01 EST
Created attachment 271524 [details]
Illustration of the workaround