-
Notifications
You must be signed in to change notification settings - Fork 9
Marking
The following describes the available marks and how to use them.
Marks are defined using comma separated values in the application.mark file.
Available features are defined using comma separated values in the
features.mark file. This file must be present and populated for marks to be
loaded properly. The master version of this file can be found
here.
Marks in application.mark are in the format:
<path>,<mark_name>,<markable_type>,<value>
where <path> is a unique identifier for the element you desire to mark,
<mark_name> is the name of the feature, <markable_type> is the xtUML element
type marked, and <value> is the value passed in to the feature.
A for the path denotes all elements of that type. A for the path and for
the markable type denotes a system-wide mark.
By default the application Java class (entry point for the application) is
named <project_name>Application where <project_name> is the name of the
xtUML project with spaces removed and each word capitalized. For example the
application name for a project called "my project" would be
"MyProjectApplication". If you would like to change this default behavior, add
the following to your application.mark file.
*,ApplicationName,*,<app_name>
ex: *,ApplicationName,*,CoreTool
where <app_name> is your custom name.
By default the application Java class is generated into a top level package
called <project_name> where <project_name> is the name of the xtUML project
with spaces removed and all lower case. For example the package name for a
project called "my project" would be "myproject". If you would like to change
this default behavior, add the following to your application.mark file.
*,ApplicationPackage,*,<package_name>
ex: *,ApplicationPackage,*,io.ciera.tool
where <package_name> is your custom package location.
The root package is the package that is the translation unit for the compiler.
This mark is required. If it is missing, no code will be generated.Add the
following to your application.mark file.
*,RootPackage,*,<package_name>
ex: *,RootPackage,*,MicrowaveOven::components
where <package_name> is the double colon delimited path to the xtUML package
you want to translate (including the project name as the first path segment).
Ciera does not guarantee order of selected instance sets, however an attribute can be configured as the global sort comparator. For any selection, if the class has an attribute by that name, it will be used to sort the result set in ascending order. This is mostly useful for model compilers when you want elements to have a consistent order on each code generation. Ciera itself uses this feature to support all named elements by the attribute "name". Configure as follows:
*,SortComparator,*,<attribute_getter>
ex: *,SortComparator,*,getName
where <attribute_getter> is the name of the generated getter method for the
attribute. Note that this mark can configure to be any method on the generated
classes — it could be configured to sort based on the return value of an
instance operation.
*,SortComparator Component,EnableSimulatedTime Component,InitFunction Component,Version Model Class,Exclude Association,Exclude Model Class,UseKeyLettersForName Port,BaseClass
Component,InstanceLoading *,NonPersistentInstanceIds Attribute,NonPersistent Model Class,NonPersistent
*,TemplateDir
*,AsyncApplication Port,HttpEndpoint