Closed stefan-ka closed 4 years ago
With v4.7.0 it is now possible to import other *.cml files and add the objects of the referenced files to the scope.
Example: File-1.cml:
BoundedContext context1
BoundedContext context2
File-2.cml:
import "./File-1.cml"
ContextMap {
contains context1, context2
context1 -> context2
}
A short documentation page for the imports has been created here: https://contextmapper.org/docs/imports/
Currently we recommend to use only one CML file to model a system. The reason is that even though it is possible to reference objects in other files, they are not resolved by the generators, which leads to strange behavior.
We have to solve this issue by implementing a proper import-mechanism where the user can decide which other files shall be in scope. Object in files which are not imported must not be referenced (Xtext auto-completion etc. has to be adjusted).