Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 441666

Summary: Remove the "Model Request Interpreter" view
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: esteban.dugueperoux, jean.barata, jessy.mallet, matthieu.helleboid, michel.bispo, stephane.bonnet
Version: 1.0.0Keywords: triaged
Target Milestone: 5.0.0M7   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/88981
https://git.eclipse.org/r/96447
https://git.eclipse.org/r/96446
https://git.eclipse.org/r/96448
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d9d2ee12c8800bd5afaa5ddb1bd0b6e22f04bbe9
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8ab04eb2f312b998006c1ab0fca06be6691ea4e9
https://git.eclipse.org/r/96857
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b972a52b93295d7886e1376ca27777ab2a986067
Whiteboard:

Description Pierre-Charles David CLA 2014-08-13 05:04:46 EDT
The "Model Requests Interpreter" View (DesignerInterpreterView in the code) is still included in sirius.ui.

However, is it mostly deprecated (not maintained or tested) now that we contribute to the "Interpreter" View provided by Acceleo 3.

We should see if any important feature present in the old view can be added into Acceleo's "Interpreter" view, and remove the old view and the corresponding code once any such feature is ported.
Comment 1 Matthieu Helleboid CLA 2014-08-13 05:40:22 EDT
We use this view a lot and find it very useful as is. Would it be possible to move this view as is to Query Legacy?
Comment 2 Matthieu Helleboid CLA 2014-08-13 05:55:25 EDT
Is the new "Interpreter" view support the query legacy interpreter?
Comment 3 Pierre-Charles David CLA 2014-08-13 08:06:27 EDT
(In reply to Matthieu Helleboid from comment #2)
> Is the new "Interpreter" view support the query legacy interpreter?

In the "Interpreter" view from Acceleo 3, if you select "Sirius" as the language to use, it uses the generic Sirius interpreter which is able to understand all the languages supported by Sirius. If you have the legacy plug-in installed, it will understand legacy expressions.

There are a few limitations when using the "Sirius" language in that view, regarding syntax coloring and completion. But the evaluation logic itself should work fine.
Comment 4 Matthieu Helleboid CLA 2014-08-13 08:39:50 EDT
You're right, the "Interpreter" seems to work fine with the query-legacy interpreter. And this view have the same features (completion is working) as the "Model Requests Interpreter" one and even more (results alphabetical sort).

But the "Interpreter" view seems to be slower the the "Model Requests Interpreter", is it because it must create a new interpreter each time an expression must be evaluated?
Comment 5 Pierre-Charles David CLA 2014-08-13 09:27:57 EDT
(In reply to Matthieu Helleboid from comment #4)
> But the "Interpreter" view seems to be slower the the "Model Requests
> Interpreter", is it because it must create a new interpreter each time an
> expression must be evaluated?

It doesn't, but there is a hard-coded delay of 0.5s of inactivity before launching the evaluation to avoid showing evaluation errors due to incomplete and bogus partial expressions while the user is typing them. See http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/tree/plugins/org.eclipse.acceleo.ui.interpreter/src/org/eclipse/acceleo/ui/interpreter/view/InterpreterView.java#n2731
Comment 6 Matthieu Helleboid CLA 2014-08-13 10:03:15 EDT
Ok. But it's a pity to have to wait 500ms when you change the selection and do not change the expression. It's not that it takes to much time, but in comparison with the "Model Requests Interpreter" view, it looks like this view is very slow.
But maybe we should then discuss this on an acceleo bugzilla.
Comment 7 Jean Barata CLA 2014-08-27 11:56:44 EDT
Would it be possible to move this view as is to Query Legacy?
Comment 8 Pierre-Charles David CLA 2014-08-28 09:04:01 EDT
(In reply to Joao Barata from comment #7)
> Would it be possible to move this view as is to Query Legacy?

I'd rather not, query legacy was done for a very specific purpose and should be considered frozen, except for major bugs or adaptations to work with the current Sirius (if we change the IInterpreter APIs for example).

Concerning the "Model Request Interpreter" view itself, it is already in Sirius (as opposed to the case of the query legacy support), so we can follow a more normal path:
1. mark it as deprecated and/or hide it default.
2. make sure the alternative we propose handles all the use cases for current users (i.e. you), so that they are confortable making the switch.
3. remove the old view.

If for some reason we decide that step 2 is not possible, well then we'll see.

For now, the view is still in Sirius, and available in the "Sirius" category of the "Show view..." dialog (though not as a shortcut view). For step 1, we could keep the code as it is, but remove its contribution in org.eclipse.sirius.ui's plugin.xml. It would make the view unavailable to most users, but downstream projects (like Capella) could keep it by simply adding the few relevant lines in one of their plugin.xml files.

In parallel, we can discuss which features or bugfixes you would need in the new "Interpreter" view to make the switch on your side. Matthieu mentioned the 500ms delay; we can see with the Acceleo team if this can be improved or made configurable. Is there anything else you would need to switch to the new view?
Comment 9 Eclipse Genie CLA 2017-01-18 09:50:29 EST
New Gerrit change created: https://git.eclipse.org/r/88981
Comment 10 Eclipse Genie CLA 2017-05-05 04:25:24 EDT
New Gerrit change created: https://git.eclipse.org/r/96447
Comment 11 Eclipse Genie CLA 2017-05-05 04:25:28 EDT
New Gerrit change created: https://git.eclipse.org/r/96446
Comment 12 Eclipse Genie CLA 2017-05-05 04:25:31 EDT
New Gerrit change created: https://git.eclipse.org/r/96448
Comment 15 Pierre-Charles David CLA 2017-05-11 10:38:05 EDT
Closing this for 5.0: the old view is not accessible anymore, and the "new" one from Acceleo systematically used (and available in our repo with no extra dependencies). I'll create a separate ticket for 5.1 to actually remove the implementation code (which still exists for now in case some users still need it for the transition phase).
Comment 16 Eclipse Genie CLA 2017-05-11 10:53:04 EDT
New Gerrit change created: https://git.eclipse.org/r/96857
Comment 17 Pierre-Charles David CLA 2017-05-11 10:56:07 EDT
(In reply to Pierre-Charles David from comment #15)
> I'll create a separate ticket for 5.1 to actually
> remove the implementation code

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=516516
Comment 19 Jessy Mallet CLA 2017-05-15 09:04:50 EDT
Validated with Sirius 5.0.0.201705121003
Comment 20 Pierre-Charles David CLA 2017-05-17 03:19:57 EDT
Verified by Jessy.
Comment 21 Pierre-Charles David CLA 2017-06-29 03:32:33 EDT
Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details.