--- Brian Topping <[EMAIL PROTECTED]> wrote: > hi all, > > i'm developing a cartridge template that intends to > aggregate information > from all classes with a certain stereotype, but > finding it difficult because > the templates are better suited to generating "for > each". I see how Wouter > did this... by adding a model element to a "static > area" that triggers the > generation of the struts-config.xml in a "for all" > manner, but i'd rather > avoid this if possible. Wouter, what says thee... > would you have skipped > this static stuff if you could have? you mention on > your wiki that some of > the static elements are implicit, but i can't find > out how. > > the change requires updating AndroMDAGenTask to > "pivot" the data and iterate > again -- in other words, iterate over the cartridges > and templates that > specify "forAll" treatment, calling them one time > each, but sending in the > collection of modelElements. this specification of > "forEach" or "forAll" is > very handy and both are used liberally in xdoclet > templates.
I agree with you, I think it would be useful, I was planning on adding the ability to specify a boolean attribute called "outputToSingleFile" in a <template/> element which would place all the relevant model elements (i.e. all the model elements that had stereotypes defined in the <template/>...you can now specify multiple stereotypes per template in the MMD 3.x branch) into a variable called $classes (instead of $class). That way it would give you only the model elements that would be relevant, it would write the file only once, and you wouldn't have to search the entire model for the few model elements you needed. > > what do you guys say? > > thanks, > > -b > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps > Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id56&alloc_id438&op=click > _______________________________________________ > Andromda-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/andromda-devel ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Andromda-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-devel