I have tried and I can see the same type of problems. create extensions are a
bit special. I have found the following way to solve your problem. You have
to copy and modify the full create extension into your advice file.

import sculptordsl;

extension org::openarchitectureware::xtext::registry::Modelloader reexport;
extension org::fornax::cartridges::sculptor::dsl::Extensions;
extension extensions::helper;
extension transformation::DslTransformation;

around transformation::DslTransformation::transform(DslEntity domainObject)
: 
        debugTrace("AROUND " + domainObject.name) ->
        domainObject.transform2();
        
create sculptormetamodel::Entity this transform2(DslEntity domainObject) :
    setA(domainObject.a) -> 
    setB(domainObject.b) -> 
    setC(domainObject.c) -> 
    setD(domainObject.d) -> 
    constants.addAll(domainObject.constants.transform()) ->

    setDoc(domainObject.doc) ->
    setName(domainObject.name) ->
    setPackage(domainObject.package) ->
    setAbstract(domainObject.abstract) ->
    setOptimisticLocking(!domainObject.notOptimisticLocking) ->
    setAuditable(!domainObject.notAuditable) ->
    setCache(domainObject.cache) ->
    setDatabaseTable(domainObject.databaseTable) ->
    setAggregateRoot(!domainObject.notAggregateRoot) ->
    attributes.addAll(domainObject.attributes.transform()) ->
    references.addAll(domainObject.references.transform()) ->
    (domainObject.extends != null ?
        setExtends(domainObject.extends.transform()) :
        null) ->
    (domainObject.repository != null ?
      setRepository(domainObject.repository.transform()) :
      null); 

create sculptormetamodel::Constant this transform(DslConstant constant) : 
    setDoc(constant.doc) -> 
    setName(constant.name) -> 
    setValue(constant.value) ->     
    (constant.valueRef != null ? 
      setValueRef(constant.valueRef.transform()) : 
      null 
    ); 

-- 
View this message in context: 
http://www.nabble.com/-Sculptor--Using-AOP-on-DslTransformation.ext-tp18968553s17564p18970033.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