Skip to content

Commit

Permalink
Move preferredView and DocumentationClass to the more logical place "…
Browse files Browse the repository at this point in the history
…Annotations for the Graphical User Interface"
  • Loading branch information
otronarp committed Feb 11, 2020
1 parent d2a06ed commit baae142
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions chapters/annotations.tex
Expand Up @@ -68,27 +68,7 @@ \section{Annotations for Documentation}\doublelabel{annotations-for-documentatio
\begin{lstlisting}[language=modelica]
<a href="Modelica://MultiBody.Joints.Revolute#info">Revolute</a>
\end{lstlisting}
\begin{lstlisting}[language=grammar]
preferred-view-annotation:
annotation "(" preferredView "=" ("info" | "diagram" | "text") ")"
\end{lstlisting}

The \lstinline!preferredView! annotation defines the default view when selecting the
class. \lstinline!info! means info layer, i.e., the documentation of the class,
\lstinline!diagram! means diagram layer and \lstinline!text! means the Modelica text layer.
\begin{lstlisting}[language=grammar]
documentation-class-annotation:
annotation "(" DocumentationClass "=" true ")"
\end{lstlisting}

Only allowed as class annotation on any kind of class and implies that
this class and all classes within it are treated as having the
annotation preferredView="info". If the annotation preferredView is
explicitly set for a class, it has precedence over a DocumentationClass
annotation \emph{{[}A tool may display such classes in special ways. For
example, the description texts of the classes might be displayed instead
of the class names, and if no icon is defined, a special information
default icon may be displayed in the package browser.{]}}

\section{Annotations for Code Generation}\doublelabel{annotations-for-code-generation}
\begin{lstlisting}[language=grammar]
Expand Down Expand Up @@ -1031,9 +1011,32 @@ \subsubsection{Edit input}\doublelabel{edit-input}
end OnMouseDownEditString;
\end{lstlisting}
\section{Annotations for the Graphical User Interface}\doublelabel{annotations-for-the-graphical-user-interface}
This section describes the annotations that are used to define properties of the
graphical user interface.

\begin{lstlisting}[language=grammar]
preferred-view-annotation:
annotation "(" preferredView "=" ("info" | "diagram" | "text") ")"
\end{lstlisting}

The \lstinline!preferredView! annotation defines the default view when selecting the
class. \lstinline!info! means info layer, i.e., the documentation of the class,
\lstinline!diagram! means diagram layer and \lstinline!text! means the Modelica text layer.

\begin{lstlisting}[language=grammar]
documentation-class-annotation:
annotation "(" DocumentationClass "=" true ")"
\end{lstlisting}

Only allowed as class annotation on any kind of class and implies that
this class and all classes within it are treated as having the
annotation preferredView="info". If the annotation preferredView is
explicitly set for a class, it has precedence over a DocumentationClass
annotation \emph{{[}A tool may display such classes in special ways. For
example, the description texts of the classes might be displayed instead
of the class names, and if no icon is defined, a special information
default icon may be displayed in the package browser.{]}}

A class may have the following annotations to define properties of the
graphical user interface:
\begin{lstlisting}[language=modelica]
annotation(defaultComponentName = "name")
\end{lstlisting}
Expand Down

0 comments on commit baae142

Please sign in to comment.