On this page ...
Projections and Indentation
Indentation in a projection directly affects its display. Thus, in the following example literal text will
appear eight spaces farther to the right than This is.
// Insurance/src/defs/editor-indentation.edit#L6-L14
Text {
[
This is
literal text
that is projected in the
editor
for every concept of type Text.
]
} However, this is not the complete story. Any whitespace before the line with the least indentation is ignored. Therefore, you can indent the projection block as a whole without affecting its appearance. The next example produces the exact same result as the previous.
// Insurance/src/defs/editor-indentation.edit#L16-L24
Text2 {
[
This is
literal text
that is projected in the
editor
for every concept of type Text.
]
} In the following example, the line with the least indentation is for every concept of type Text. It will not be indented. On the other hand,
the text This is will be indented 10 spaces, literal text will be indented 8 spaces, etc.
// Insurance/src/defs/editor-indentation.edit#L26-L34
Text3 {
[
This is
literal text
that is projected in the
editor
for every concept of type Text.
]
} When determining of the least indent, the indentation of the closing bracket is also considered. Therefore,
the following example will take the closing bracket as margin, and even the line for every concept of type Text. will be indented with three spaces.
// Insurance/src/defs/editor-indentation.edit#L37-L45
[
This is
literal text
that is projected in the
editor
for every concept of type Text.
]
}