Hi Patrik,

Neat!!  That is so awesome.  I will test this out after I solve another
problem that I ran into.  It turns out that importing design files from
another project does not run in an automated test environment.  :(

http://www.openarchitectureware.org/forum/viewtopic.php?showtopic=10623

I do have a question about your implementation for this feature.  Do you
think that merging the external objects into the current model and then
coding various templates to ignore the external objects is cumbersome?  It
seems like keeping them in a separate Application that is referenced from
the current Application is better encapsulation because you don't have to
touch any of the template files.  Obviously I'm no oAW expert, so I'm just
trying to learn more about how you came to select one technique versus
another.

Thanks,
Polly



Patrik Nordwall wrote:
> 
> 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-tp20269181s17564p20311126.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

Reply via email to