Hi Tony,

I found that tagged value change a little too dangerous to do myself
because I do not completely understand the hierarchy of script helper
classes (I need more info on this, anyway). Could you implement a
getTaggedValues() function at the correct hierarchy level and give me a
short example how to call it on "java.lang.object modelElement"?

I'll implement the automatic cartridge selection based on the tagged
values, afterwards.

Cheers...
Matthias

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Anthony Mowers
> Sent: Wednesday, April 02, 2003 9:01 PM
> To: Matthias Bohlen
> Cc: Developers AndroMDA
> Subject: RE: [Andromda-devel] Cartridges almost working - 
> need some help
> 
> 
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of 
> > Matthias Bohlen
> > Sent: Wednesday, April 02, 2003 10:47 AM
> > To: 'Developers AndroMDA'
> > Subject: [Andromda-devel] Cartridges almost working - need some help
> >
> >
> > Hi all,
> >
> > during the last two days, I have done an implementation of the new 
> > pluggable cartridge system for AndroMDA. I have wrapped the EJB 
> > templates in the first cartridge, and it almost works (still some 
> > problems to make Velocity find the templates inside the 
> cartridges). I 
> > have shamelessly copied the XDoclet class "ModuleFinder" to 
> > automatically discover cartridges installed on the classpath.
> >
> > Now, I need two things (Tony, maybe, you can help me):
> >
> > 1) Access to tagged values in general to select cartridges 
> There is a 
> > method called AndroMDAGenTask.processModelElementStereotype(). This 
> > method currently selects templates based on stereotypes. In the new 
> > version, it will select a cartridge instead and ask the 
> cartridge for 
> > its templates. It should select the cartridge based on 
> stereotype and 
> > tagged values for the architectural aspects (see my long email  
> > "sharpening the bleeding edge" from a few days ago).
> >
> > Tony, the signature of the method looks like this:
> > private void processModelElementStereotype(
> >         Context context,
> >         Object modelElement,
> >         String stereotypeName)
> >         throws BuildException
> >
> > How can I get the tagged values attached to "modelElement"?
> >
> 
> You will probably want to add something like a 
> 'getTaggedValues' method onto the interface:
>   org.andromda.commmon.ScriptHelper
> 
> The class org.andromdda.uml14.UMLStaticHelper class already 
> implements this method.  In order to get things to compile 
> you should only have to pull the method implementation up to 
> it's superclass: UMLDefaultHelper.
> 
> Where you might run into problems is that these tags can be 
> more complicated data types than just name-value pairs and 
> the tags are represented slightly different from one case 
> tool to the next.  I don't think we can really know what the 
> problems are going to be until you do the above step.
> 
> > 2) Tagged value inheritance
> > It would be nice, if tagged values could be inherited from 
> the model 
> > to the packages and from the packages to the classes. That way, it 
> > would be sufficient if the user attached 
> @andromda.persistence="jdo" 
> > to the top model node and inherit this setting down the 
> entire model 
> > tree. The same thing would apply to a package (that way, 
> one package 
> > could have ejb persistence and the other package could have 
> > hibernate).
> >
> > Tony, what do we have to do to make this tagged value inheritance 
> > work?
> >
> 
> There are two types of inheritance that you might be talking 
> about here. One is traversing up the 'Generalization' tree 
> from class to superclass. The other is traversing up the 
> ownership tree from one namespace to the containing 
> namespace.  A class for example is a namespace which can be 
> contained by a package which in turn is a namespace that can 
> ultimately be contained by a model namespace.
> 
> I am not sure which way you want to do it. Perhaps you want 
> to be able to do both?
> 
> Or possibly you might want to use another modelling element 
> type such as a UML deployment container or subsystem?  When I 
> started thinking about doing testcases I was thinking about 
> the idea of creating a JUnit container in the UML and 
> dropping class and/or packages into the container in order to 
> cause JUnit testcases to be generated.  I was thinking that 
> one could then configure the testcase generation by 
> configuring the aspects of the container.  I didn't quite 
> have the idea worked out and I had hope to play with it a bit.
> 
> The other thing is that I would like to be able to configure 
> architectural aspect not only from UML but also from the 
> build.xml.  Sometimes I would like to do a quick tweak to the 
> build file to temporarily enable/change something about the 
> code generation without having to open the model - for 
> example turning on and off abstract versus stub method 
> generation for EJB beans. It is nice to turn on abstract 
> method generation sometimes in order to verify no method 
> implementations are missing.
> 
> One way of doing this, which just now came to mind is that it 
> should be possible from the build.xml to load in a UML model 
> into MDR, as we are now doing, and then add tags to UML model 
> elements via directives in the
> build.xml.    For example, an ant task something like 
> UserProperty could be
> written that could actually be used to write a tag value onto 
> a specified model element after the model has been read into 
> the MDR.  One would then be able to configure architectural 
> aspects from the build.xml or from the UML and the AndroMDA 
> core would not know the difference.
> 
> What do you think?
> 
> 
> > Curious...
> > Matthias
> >
> > ---
> >
> > Matthias Bohlen
> > "Consulting that helps project teams to succeed..." 
> > http://www.mbohlen.de/
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other 
> > company gives more support or power for your dedicated server 
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Andromda-devel mailing list [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/andromda-devel
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your 
> dedicated server 
> http://click.atdmt.com/AFF/go/sdnxxaff00300> 020aff/direct/01/
> 
> 
> _______________________________________________
> Andromda-devel mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/andromda-devel
> 




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to