Skip to content

Latest commit

 

History

History
92 lines (65 loc) · 4.73 KB

File metadata and controls

92 lines (65 loc) · 4.73 KB

Overview

This asset contains extensions to the odesign editor providing Xtext-enabled text entry fields.

Xtext-enabled editors provide the usual Xtext features: syntax highlighting, auto completion, validation, etc.

The Xtext language does not need to be modified to be used in the editor (except for [advancedCapabilities]).

The text entry fields can be placed

  • either inside a Sirius diagram (direct editors; directEdit)

  • or in the Sirius properties view (widgets; property).

The contents of the editors can be retrieved from two sources:

  • A semantic element of a model that’s used as input to the diagram (model). In this case, we may set additional options:

  • A String feature of a semantic element (value). In this case, we may supply additional information if we wanted to edit an incomplete model:

    • text (hidden from the end-user) to be pre-pended (prefixText),

    • text (hidden from the end-user) to be appended (suffixText).

For model-based directEdit editors, if the model element is an edge, the affected label must be set (edgeLabelPosition).

An editor can display

For all editors, we can set:

For all editors, we need to provide

  • An injector to access the Xtext language to use (injector).

All of this can be summarized in one table:

property directEdit add. info [info]

model

XtextSingleLineModelDescription singleLine

XtextDirectEditModelDescription singleLine

edgeLabelPosition

prefixTerminals
suffixTerminals

XtextMultiLineModelDescription multiLine

XtextDirectEditModelDescription multiLine

value

XtextSingleLineValueDescription singleLine

XtextDirectEditValueDescription singleLine

prefixText
suffixText

XtextMultiLineValueDescription multiLine

XtextDirectEditValueDescription multiLine

add. info [info]

editableFeatures,
ignoredNestedFeatures
selectedFeatures

for all: injector
cancelOnValidationError
enableFormatter

As advanced capabilities,

Packaging

we provide two different Eclipse features:

  • com.altran.general.integration.xtextsirius.design.feature contains all Eclipse plug-ins required to edit the Xtext-enabled entry fields in the odesign editor. It also contains the runtime feature below.

  • com.altran.general.integration.xtextsirius.runtime.feature contains all Eclipse plug-ins required at runtime to use the Xtext-enabled entry fields in a diagram (or associated property view).