Bug 473418 - Provide a service to print a variable value
Summary: Provide a service to print a variable value
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-07-23 11:04 EDT by Melanie Bats CLA
Modified: 2015-10-02 10:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Melanie Bats CLA 2015-07-23 11:04:05 EDT
The idea is to be able using AQL from Sirius to view in the console the value of a variable. Something like myvar.trace() would be really cool.
Comment 1 Eclipse Genie CLA 2015-09-22 06:02:49 EDT
New Gerrit change created: https://git.eclipse.org/r/56414
Comment 2 Yvan Lussaud CLA 2015-09-22 08:06:23 EDT
https://git.eclipse.org/r/56414

This patch show the metamodels and services in the environment and also the current receiver value. But since variable are not in the environment they can't be printed... To do so we have to make variables part of the environment... not sure it's a good idea.
Comment 3 Cedric Brun CLA 2015-09-22 08:27:26 EDT
(In reply to Yvan Lussaud from comment #2)
> https://git.eclipse.org/r/56414
> 
> This patch show the metamodels and services in the environment and also the
> current receiver value. But since variable are not in the environment they
> can't be printed... To do so we have to make variables part of the
> environment... not sure it's a good idea.

That could be easier to add a specific Service at the Sirius level which would gather the variable based on the current session.
Comment 4 Pierre-Charles David CLA 2015-09-22 11:11:42 EDT
(In reply to Cedric Brun from comment #3)
> (In reply to Yvan Lussaud from comment #2)
> > https://git.eclipse.org/r/56414
> > 
> > This patch show the metamodels and services in the environment and also the
> > current receiver value. But since variable are not in the environment they
> > can't be printed... To do so we have to make variables part of the
> > environment... not sure it's a good idea.
> 
> That could be easier to add a specific Service at the Sirius level which
> would gather the variable based on the current session.

Moving the bug to Sirius.

On the Sirius side we already have PrintInterpreterVariablesAction, which is language-agnostic but only available as an External Java Action, which is cumbersome to invoke.

It should be converted into an equivalent service into org.eclipse.sirius.common.tools.api.interpreter.StandardServices, which is supposed to hold this kind of "standard services" for Sirius.