Open eclipse-qvtd-bot opened 21 hours ago
By Ed Willink on Mar 10, 2013 04:08
There are three kinds of 'imports'
Textual include in the host language as a modularization convenience.
Perhaps "include 'URI';"
Textual include in another language, such as Complete OCL, that is so tightly coupled to the metamodel as to prohibit separate compilation.
Perhaps "include 'URI' : language;"
Metamodel import to resolve references during analysis.
Note that a transformation is a package and so transformations and packages may be imported using the same syntax.
nsURI - the namespace URI bound to a Package model element\ fileURI - a file identification resolveable by the host platform
Import of a package
"import 'nsURI'" -- package name visible in global scope\ "import 'fileURI'::X" -- X visible in global scope
with aliases
"import Y : 'nsURI'" -- Y and package name visible in global scope\ "import Y : 'fileURI'::X" -- Y and X visible in global scope
nested navigation may be used
"import Y : 'nsURI'"::Z -- Y and package name visible in global scope\ "import Y : 'fileURI'::X::Z" -- Y and Z visible in global scope
the final nested navigation step may be a multi-import
"import 'nsURI'":: -- all subpackage names visible in global scope\ "import Y : 'fileURI'::X::" -- all subpackage names visible in global scope
aliases and multi-imports may not be used together
There is no metamodel import; a simple file import is treated as a root multi-import
"import 'fileURI'" -- all root package names in global scope
Import of an nsURI assumes that there is a registry indexable nsURI; i.e. the EPackageRegistry. The imported content should be self-describing allowing a variety of content representations to co-exist.
Import of a fileURI may use platform: relative URIs to bypass the need for registry entries for dynamic/development content.
Built-in facilities may be displaced by library imports...
By Ed Willink on Mar 12, 2015 15:01
Promoting the CompleteOCL import support for use by any CS and defining the missing xxCSREsource to xxASResourceFactory mappings and import works for a *.qvtr, so it could be that any import just works by the magic of ASResourceFactory registrations.
Perhaps 'library' imports are redundant.
Perhaps 'include' imports are redundant. Do we need a textual import when a Pivot AS import is more disciplined?
| --- | --- | | Bugzilla Link | 402591 | | Status | NEW | | Importance | P3 normal | | Reported | Mar 06, 2013 17:02 EDT | | Modified | Mar 18, 2015 16:44 EDT |