Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Variable and Debug views #97

Merged
merged 43 commits into from
Mar 12, 2019
Merged

Improve Variable and Debug views #97

merged 43 commits into from
Mar 12, 2019

Conversation

dvojtise
Copy link
Contributor

@dvojtise dvojtise commented Mar 5, 2019

This PR provides several improvements to the Variable view and the Debug view (Stack)

It tries to harmonize several displays.

Debug (Stack) view

  • the notion of context is now different from current instruction in the frames (was mixed)
    -- when these 2 notions points to 2 different model elements, then the frame name is displayed differently. It uses an arrow => to indicates the current instruction.
    -- this greatly improves support for languages with nested content (such as block) and language with an xtext grammar. In xtext editor, this is the current instruction that will be highlighted.
  • the topmost frame is displayed in italic, this hightlight the fact that this frame is "about to start" and that it has no equivalent in traditionnal debugger such as Java.
  • Global context frame, is now renamed Engine,
    -- the context of this frame is now the emf resource.
  • automatic selection of frame now select the last currently executing frame (ie. it ignores the one that is "about to start". This allows focussing on a frame that has relevant data changes in the Variable view
  • names of the objects now support a new "short name" base on uri fragment: Before it only supported names based on the availability of a "name" attribute in the metaclass of fallback to java toString. This uri fragment gives hint to the user about the order of the elements and their containment in the model.

Variable view

  • new variable self which indicates the context of the selected frame in the Debug view.
  • use of icons in order to differenciate runtime data from static data: a top right yellow lock icon overlay is used to identify RTD, a bottom right lock icon overlay (red or green) is used to identify static data
    -- the green vs red color for the static data is an experimental support for enabling/disabling changes in the static part of the model (live modeling). It should be red everywhere but due to other limitation not handled yet, only the top element is in red.
  • names of the objects in the variable name now support a new "short name" base on uri fragment: Before it only supported names based on the availability of a "name" attribute in the metaclass of fallback to java toString. This uri fragment gives hint to the user about the containment of the elements in the model.
  • [Experimental] a new button (in the Variables view toolbar) allows using a nested of flat layout for the variables. When enabled, the view displays only the top RTD. Ie. the RTD contained by another RTD are not shown (as they can be viewed by opening the top element). However, when using "nested" layout, the nested element cannot be modified anymore and the data change highlighting (yellow) does not work too. Additionally, the change between flat / nested layout is not completely taken into account immediately and require a restart of the model. If this feature is satisfying, then we'll open issues in order to remove these 3 limitations.

Official examples

  • using these new view improvements, the sequential language K3FSM and MelangeK3FSM looks better if the main method not only has the @main annotation but also the @step annotation.

FSM and Logo example not using this PR.
runtime-fix_modeldebugging_83 - model_examples-square logo - gemoc studio _109_before

FSM and Logo example with this PR.
runtime-fix_modeldebugging_83 - model_examples-square logo - gemoc studio _108_after_varaible_view_improvement

Logo with this PR and experimental nested layout
runtime-fix_modeldebugging_83 - model_examples-square logo - gemoc studio _110_variable_experimental

This PR contributes to #87 #88 and #91

This PR comes with eclipse/gemoc-studio#143

added several diagrams documenting the current state of the simulation
and model animation framework API


Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
New Self variable that is points to the target of the instructions of
the selected stack frame

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
In case a single step create several nested eObjects, only the fields of
the root one were shown. (ex: a runtime containing a turtle does not
show the turtle fields).
Now, when a new object is detected, it recursively look into its
content.

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
add a button in order to display variable in a nested way if another
variable already contains it
contributes to
#87

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
- in order to differenciate currentinstruction and context
- in order to use an uri based printable name instead of the java
toString()

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
also removed public/private warnings

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
topmost frame is the stack created but not run yet
as it is different from java usual presentation, let's differenciate it
but putting it in italic

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
it highlights static data versus dynamic data using a small lock/unlock
overlay

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
it highlights static data versus dynamic data using a small lock/unlock
overlay

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
allows to clarify runtime data and static data in the tree
- uses yellow lock (bottom right) for RTD
- uses red closed lock (top right) for unmodifiable static data
- uses green open lock (top right) for unmodifiable static data


Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
this allows to navigate to the containing element in the tree and
display a more consistent status in the label decorator

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
use uriBased name instead of java internal id when dealing with EObjects

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
added several diagrams documenting the current state of the simulation
and model animation framework API


Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
New Self variable that is points to the target of the instructions of
the selected stack frame

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
In case a single step create several nested eObjects, only the fields of
the root one were shown. (ex: a runtime containing a turtle does not
show the turtle fields).
Now, when a new object is detected, it recursively look into its
content.

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
add a button in order to display variable in a nested way if another
variable already contains it
contributes to
#87

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
- in order to differenciate currentinstruction and context
- in order to use an uri based printable name instead of the java
toString()

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
also removed public/private warnings

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
topmost frame is the stack created but not run yet
as it is different from java usual presentation, let's differenciate it
but putting it in italic

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
it highlights static data versus dynamic data using a small lock/unlock
overlay

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
it highlights static data versus dynamic data using a small lock/unlock
overlay

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
allows to clarify runtime data and static data in the tree
- uses yellow lock (bottom right) for RTD
- uses red closed lock (top right) for unmodifiable static data
- uses green open lock (top right) for unmodifiable static data


Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
this allows to navigate to the containing element in the tree and
display a more consistent status in the label decorator

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
use uriBased name instead of java internal id when dealing with EObjects

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
…studio-modeldebugging.git into improve-variable-view
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
The top frame (Global context/Engine) now is able to display its
context: in this case we consider the resource
use an adpater in order to display the context/resource/EList as an
EObject suitable for the debugger

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
This project is used to provide an EObject representation of the Engine
context
This is used by an adapter class in the debugger

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
ie. ignore the top step "about to start"
this allows to focus on a frame that shows runtime data changes in
yellow

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
@dvojtise dvojtise changed the title Improve Variable and Debug view Improve Variable and Debug views Mar 5, 2019
@dvojtise dvojtise merged commit 177def7 into master Mar 12, 2019
@dvojtise dvojtise deleted the improve-variable-view branch April 10, 2019 15:51
dvojtise added a commit to eclipse/gemoc-studio-execution-java that referenced this pull request Jan 14, 2020
)

* documentation of the simulation and model animation framework API
** added several diagrams documenting the current state of the simulation and model animation framework API
* add a new "self" variable in the variable view
** New Self variable that points to the target of the instructions of the selected stack frame
* fix creation of mutable variable when creating several nested eObject
** In case a single step create several nested eObjects, only the fields of the root one were shown. (ex: a runtime containing a turtle does not show the turtle fields). Now, when a new object is detected, it recursively looks into its content.
* Nested / flat variable layout in Debug Variable view
** add a button in order to display variable in a nested way if another variable already contains it
contributes to eclipse/gemoc-studio-modeldebugging#87
* small optimisation when looping on mutable variables
* improve stack frame text
** in order to differentiate currentinstruction and context
** in order to use an uri based printable name instead of the java
toString()
* distinguish context and current instruction
** also removed some public/private warnings in code
* when selecting stack frame, use currentInstruction in xtext editor
* differentiate topmost frame from other
** topmost frame is the stack created but not run yet as it is different from java usual presentation, let's differentiate it but putting it in italic
* add a decoration on variable icons
** it highlights static data versus dynamic data using a small lock/unlock overlay
** allows to clarify runtime data and static data in the tree
*** uses yellow lock (bottom right) for RTD
*** uses red closed lock (top right) for unmodifiable static data
*** uses green open lock (top right) for unmodifiable static data
* add notion of parent in DSLDebugElement
** this allows to navigate to the containing element in the tree and display a more consistent status in the label decorator
* improve display name for the variable
** use uriBased name instead of java internal id when dealing with EObjects
** rename frame "Global context" into "Engine"
* top frame also get context/instruction different presentation
** The top frame (Global context/Engine) now is able to display its context: in this case we consider the resource use an adapter in order to display the context/resource/EList as an EObject suitable for the debugger
* Engine frame uses the resource name as part of its name
* add new project o.e.g.executionframework.engine.model to the studio
** This project is used to provide an EObject representation of the Engine context This is used by an adapter class in the debugger
* select the topmost frame where the step is actually started
** ie. ignore the top step "about to start" this allows to focus on a frame that shows runtime data changes in yellow


contributes to eclipse/gemoc-studio-modeldebugging#87 eclipse/gemoc-studio-modeldebugging#88 and eclipse/gemoc-studio-modeldebugging#91
Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant