amphoras wrote:
>
> Hi,
>
> I am trying to using AOP to add to the Sculptor helper.ext method
> "getExtendsAndImplementsLitteral". I saw in the oAW forums and the oAW
> video that it is supposed to be possible:
>
> http://www.openarchitectureware.org/forum/viewtopic.php?showtopic=5923
>
In that post the solution is to use
<extensionAdvices value="extensions::advices::myadvice"/>
in the Generator component.
That is maybe not an option for you. It would be better to use XtendAdvice
with Generator (Xpand) target. I don't know how to do that. Maybe it is not
currently supported by oAW.
I found a few problems in your code. Note that DslEntity etc is not used
here. I would write it something like this...
around extensions::helper::getExtendsAndImplementsLitteral(DomainObject
domainObject):
((String) ctx.proceed()) + getExtraImplements(domainObject);
String getExtraImplements(DomainObject domainObject) :
(domainObject.metaType == Entity || domainObject.metaType ==
ValueObject) ?
" implements com.foo.MyInterface" :
"";
String getExtraImplements(DomainObject domainObject) :
if (domainObject.metaType == Entity) then
(((Entity) domainObject).useInterface ? " implements
com.foo.MyInterface"
: "")
else if (domainObject.metaType == ValueObject) then
(((ValueObject) domainObject).useInterface ? " implements
com.foo.MyInterface" : "");
/Patrik
--
View this message in context:
http://www.nabble.com/Using-AOP-to-extend-ext-file-tp18930627s17564p18932964.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