I have started
http://www.fornax-platform.org/tracker/browse/CSC-262
I have added possibility to mark an import as external, i.e. existing in
another project.
Syntax:
external import
"platform:/resource/fornax-cartridges-sculptor-generator/src/test/resources/nested3.design"
external import
"platform:/resource/fornax-cartridges-sculptor-generator/src/test/resources/nested4.design"
ApplicationPart NestedPart2 {
Module nested2 {
ValueObject B {
String b
- @C c
- @D d
}
}
}
I have overwritten the model() function in Extensions.ext (dsl project). It
loads imports recursively and marks modules from external imports.
It will handle the case:
model1
import model2
external import model3
import model4
Modules in model3 and model4 will be marked as external (in the context of
model1, model2).
This is what I did in Extensions.ext
// recursive imports, and on the fly assignment of external
List[emf::EObject] model(DslImport this) :
(let loaded1 = model==null?{}:model.load().flatten() :
(this.external ?
(loaded1.typeSelect(DslModel).imports.setExternal(true) ->
loaded1.typeSelect(DslModel).app.modules.setExternal(true)
):
null
) ->
loaded1.union(loaded1.typeSelect(DslModel).imports.model().flatten()));
I have tested this from junit NestedTransformationTest.
The only thing I have done in the generation so far is to exclude the
DomainObjects belonging to external Modules. More excludes have to be done.
Maybe we have to do something for the package naming problem, I will look in
to that.
/Patrik
--
View this message in context:
http://www.nabble.com/-Sculptor--importing-nested-design-files-tp20269181s17564p20278211.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer