Nothing Special   »   [go: up one dir, main page]

Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

OCL/Debugger

< OCL

The Current Tool

The current OCL Xtext console supports

  • input as a multi-line text edit with a multi-page history
  • output as a scolling console display
  • context selection by select a widget adpatable to an EObject somewhere
  • save and restore of input
  • load of Complete OCL resources

The history uses a slightly unsatisfactory PgUp/Dn

The output scrolls substantially for multi-line output and doesn't identify the input.

There is no debugging.

A proposal

Base a new design around the Debugger rather than the Console. This is substantially inspired by the QVTo debugger. The design should be extensible to languages that extend OCL such as QVT.

The Debugger View

Supports running the selected OCL, with single step by AST node and step into/over ExpressionInOcl calls.

  • available in Luna

Stack shows AST call trace.

  • shows nested EvaluationEnvironments in Luna

The Variables View

Displays variables applicable to the current AST node, with an ability to tunnel down to see collection/tuple elements.

  • available in Luna, but perhaps not for Tuples

The Breakpoints View

Just what you'd expect.

  • Luna has line breakpoints of dubious utility

Breakpoints can be set on operators in OCL expressions.

  • to do

The Input View

Provides a display with pull down menus to select the current context. Normally selection of an Object adaptable to EObject anywhere (excluding Debugger, Breakpoints, ... views) will change the current context. There is a Lock facility for the context.

  • to do

Provides an Essential OCL text editor to allow interactive expression entry.

  • available in Juno

The Outline facilitates setting breakpoints.

  • to do

A run button, rather than Enter will trigger execution. Optionally Enter will also trigger execution.

  • in Luna, enter still triggers execution, separate button for debug

The History View

Provides a Tree display of previous executions, one root per execution, with each root identifying its context, expression and result.

The result is a browsable tree as in the Variables View.

The context can clicked to make it the current context again.

The expression can be clicked to make it the current expression again.

Each root has a check box to contribute automatic re-evaluation to the Watch View.

The history can be imported and exported.

The Validations View

Provides two panes showing tree views of all model elements and invariants applicable to the current context.

  • available in Luna

The left hand pane shows (some of) the ResourceSet containing the current context and resembles the Sample Ecore Editor with an additional checkbox and status icon per model element.

  • available in Luna

The right hand pane shows (some of) the constraints applicable to any element in the ResourceSet containing the current context.

  • available in Luna

Optionally a multi-selection in the left-hand pane trims the right-hand view to constraints applicable to the multi-selection.

  • to do

Optionally a multi-selection in the right-hand pane trims the left-hand view to elements constrainable by the multi-selection.

  • to do

Optionally the right-hand constraint pane may be further filtered by the EMF Validation preferences.

  • available in Luna

Each node in left and right hand panes has a checkbox to include/exclude the node from constraint evaluation.

  • available in Luna

Each node in left and right hand panes has a green/red/grey icon to show the most recent constraint evaluation results.

  • available in Luna

Optionally the Watch View shows an automatically re-evaluated state.

  • to do

An invariant may be clicked to make its context the current context and its value the current expression, priming the debugger for a run.

  • no current contrext yet, context menu activates debugg in Luna

Error/Warning/Ok/Disabled icons show the prevailing state of each invariant.

  • available in Luna

The state of all check boxes can be imported and exported to facilitate reuse of subset validations.

The state of all status icons can be imported and exported to facilitate recording validations.

Menu/Toolbar options support

  • Run All validations
  • Run Filtered validations
  • Run Selected validation
  • Debug Selected validation
  • Enable/Disable auto-revalidation
  • Select/Deselect all model elements
  • Select/Deselect all constraints
  • Lock/Unlock Model element selection
  • Lock/Unlock constraint selection
  • Vertical/Horizontal/JustModel/JustConstraint layout

Back to the top