Login | Register
My pages Projects Community openCollabNet

Discussions > modules-dev > Re: [argouml-modules-dev] Code generation

argouml
Discussion topic

Back to topic list

Re: [argouml-modules-dev] Code generation

Author Luis Sergio Oliveira <euluis at zmail dot pt>
Full name Luis Sergio Oliveira <euluis at zmail dot pt>
Date 2005-07-26 15:34:17 PDT
Message Hi Frank,

the best way to get moving is to check the other code generation
modules sources, available through CVS.

Frank Raiser wrote:

>Hello,
>
>I'm trying to implement an ArgoUML module for code generation and I got
>as far as getting my module to load properly and add a JMenu to the menubar.
>
>However I'm having big troubles finding the entry point for where to tell
>ArgoUML that my module can do code generation. I've seen the FileGenerator
>interface and the Generator2 class which I assume my module has to work with.
>
>But I could not find any place where I can add my class so that it is shown
>in the corresponding generator dialogs next to the java and csharp entries.
>I read in the cookbook that the generator handling is about to be changed and
>that modules should register in org.argouml.language.Language, but from what I
>can see this doesn't yet seem to be implemented.
>
>So here's a list of my current questions:
>
>- how do you register a code generator class?
> - is it adviceable to register it 'the old way' or is the abovementioned
> implementation coming anytime soon?
> - what amount of effort is needed to change the code from the old to the new
> way of registering the class?
>
>
Now, to get the code generator working it must make available a
manifest which publishes the class that implements the Pluggable
interface. I.e., in the argouml/modules/cpp/​src/manifest.mf you
find the entries:

Manifest-Version: 2.0
Class-Path: argouml.jar
Created-By: 1.3.1 (Sun Microsystems Inc.)

Name: org/argouml/language​/cpp/generator/Gener​atorCpp.class
Extension-name: module.language.generator.cpp
Specification-Title: ArgoUML Dynamic Load Module
Specification-Version: 0.17.1
Specification-Vendor: University of California
Implementation-Vendor: Achim Spangler
Implementation-Version: 0.17.1
Implementation-Title: ArgoUML C++ code generator plugin for JDK 1.2+

Of course this is the old style modules, as I don't know these new style
you're referring...

>- where can I find documentation on the Action* classes and how to use them?
> (f.ex. to trigger XMI exporting with ActionExportXMI)
>
>
[sorry, I'm not very confidant about the following:] An Action is something
you instantiate from a (e.g.) GUI event handler, which contains logic to
perform
some action, such as making some operation on the model.

>- is there a way to to modify the .uml file for a diagram (with support from the
> ArgoUML API even?) and have the changes or the complete file displayed again?
> Or what is the preferred way to tackle round-trip engineering in ArgoUML?
>
>
Check the unit tests in the C++ Generator module. There we create models to
test code generation. The model API is excercised in a very simple way
there.
(modules/cpp/tests)

>I'm currently trying to investigate generating and reverse engineering Java 1.5
>source code for ArgoUML and whether it might work out as a diploma thesis, so any
>help and warnings on the matter are appreciated.
>
>
>
The ArgoUML java RTE is already implemented, altough a bit limited, in
the sence
the code generation may be in my opinium much improved (lack of javadoc
support)
and the RTE dialog isn't very functional. That said, I think you may
start from there!
The GeneratorJava and JavaImport are in the argouml/src_new directory.
The RTE
module is in the argouml/modules/java_rte directory. Install this RTE
module
and make some tests. This might be the best path to start.

Good luck :-)

--
Luis Sergio Oliveira

« Previous message in topic | 2 of 9 | Next message in topic »

Messages

Show all messages in topic

Code generation Frank Raiser <frank dot raiser at uni-ulm dot de> Frank Raiser <frank dot raiser at uni-ulm dot de> 2005-07-25 16:06:38 PDT
     Re: [argouml-modules-dev] Code generation Luis Sergio Oliveira <euluis at zmail dot pt> Luis Sergio Oliveira <euluis at zmail dot pt> 2005-07-26 15:34:17 PDT
         Re: [argouml-modules-dev] Code generation Frank Raiser <frank dot raiser at uni-ulm dot de> Frank Raiser <frank dot raiser at uni-ulm dot de> 2005-07-27 02:30:47 PDT
             RE: [argouml-modules-dev] Code generation linus Linus Tolke 2005-07-27 13:38:10 PDT
                 Re: [argouml-modules-dev] Code generation Frank Raiser <frank dot raiser at uni-ulm dot de> Frank Raiser <frank dot raiser at uni-ulm dot de> 2005-07-30 05:02:38 PDT
             Re: [argouml-modules-dev] Code generation Luis Sergio Oliveira <euluis at zmail dot pt> Luis Sergio Oliveira <euluis at zmail dot pt> 2005-07-27 15:42:21 PDT
                 Re: [argouml-modules-dev] Code generation Frank Raiser <frank dot raiser at uni-ulm dot de> Frank Raiser <frank dot raiser at uni-ulm dot de> 2005-07-30 05:27:37 PDT
     RE: [argouml-modules-dev] Code generation linus Linus Tolke 2005-07-26 21:46:48 PDT
         Re: [argouml-modules-dev] Code generation Frank Raiser <frank dot raiser at uni-ulm dot de> Frank Raiser <frank dot raiser at uni-ulm dot de> 2005-07-27 01:55:10 PDT
Messages per page: