AndroMDA is great stuff.  Its use of a repository abstraction has made it 
possible for us to do a prototype code generator in just a few days.

We have somewhat different requirements from other users since we are using
AndroMDA with a different (non-UML) repository. To make things work for us, 
I have made some changes, plus there are some work items that I have
planned.  

I'd like suggestions on
A) how to best get our work incorporated into the primary development thread
B) feedback on the work items I'll be doing, as described below.

For the changes I have already, I'm not sure which source files I should use
as the
basis for creating a patch submission.  I have been using the release 2.0.4,

however, I see a number of checkins and modifications have happened since
then.

What I have completed so far is to add a "cartridgepath" option to the
Andromda task. 
This simplifies some of the bits in the build script and also makes it
easier to debug 
if the cartridge is on the default classpath (which it sometimes is).  The
patch will
also requires using Velocity 1.4 to allow inclusion of extra template
directories.

Work that I am planning is this:
1) Extend ScriptHelper with a new method
        computeOutputFile  - given the object, cartridge and sterotype and 
                outputPattern, compute the output file.
           if null is returned, then the existing handler
                (TemplateConfiguration.getFullyQualifiedOutputFile) will be
used 
           The goal is to allow the repository to compute the filename
                for example, to take object name "abc_def" and 
                pattern "{0}/{1}Bean.java" to compute
                "build/mypackage/AbcDefBean.java" as the file to create

2)  Add a "outputDirectory" option to the andromda task.  This will be the
default 
for the outlets, AND will be available in the initializeOutput and
finalizeOutput methods

3) I need to have a single (java) file created that lists all of the files
created for each type of object. Ideally this will also be template-based
at "end of code generation time".
  My current thinking is to extend ScriptHelper with two more methods:
        initializeOutput 
        finalizeOutput
                the goal of initialize/finalize output is to allow the 
                repository-specific processing to create additional files
not attached 
                to any particular stereotype or object.
                (the outputDirectory option is required to allow this). 
           Specifically, finalizeOutput can generate a single java file 
                based on the list it accumulated during the calls to
computeOutputFile.
                (for example, to create a file listing all of the .hbm.xml
files created for hibernate)
        
I'd like suggestions on how to best implement these "overall model
templates" for finalizeOutput.  
Use of velocity from within finalizeOutput is my current thinking (using a
modified copy of processModelElementWithCartridge).  This would be
repository specific.   A more general way 
would be to create a special "outlet name" (like "_last") that matches to
all cartridges
that have a stereotype "_last".  This is probably more work than I will have
time to do.

Thanks in advance for all input.

Stanley Knutson
[EMAIL PROTECTED]
Director of Back-End Engineering
Purisma, Inc.    http://www.purisma.com
Direct: 415-902-4401






-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to