Jump to: navigation, search


Revision as of 14:50, 1 January 2013 by Ed.willink.me.uk (Talk | contribs) (The Validations View)

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.

Stack shows AST call trace.

The Variables View

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

The Breakpoints View

Just what you'd expect.

Breakpoints can be set on operators in OCL expressions.

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.

Provides an Essential OCL text editor to allow interactive expression entry. The Outline facilitates setting breakpoints.

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

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.

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.

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

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

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

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

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

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

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

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

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

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