From baae1420ebb6f6e8f4ef0e7f793250ab8d0c81b0 Mon Sep 17 00:00:00 2001 From: Otto Tronarp Date: Mon, 10 Feb 2020 13:22:32 +0100 Subject: [PATCH] Move preferredView and DocumentationClass to the more logical place "Annotations for the Graphical User Interface" --- chapters/annotations.tex | 47 +++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/chapters/annotations.tex b/chapters/annotations.tex index 15a026a73..dece1c6b5 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -68,27 +68,7 @@ \section{Annotations for Documentation}\doublelabel{annotations-for-documentatio \begin{lstlisting}[language=modelica] Revolute \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] @@ -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}