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-27 15:42:21 PDT
Message Hi Frank,

Frank Raiser wrote:

>
>What I did now was implementing org.argouml.modulelo​ader.ModuleInterface​
>instead of Pluggable. Apparently there is at least half of an implementation
>for the new loader, as it did accept my module. Makes me wonder if the concepts
>can be mixed. Could I use my current module and subclass Generator2 and
>implement FileGenerator to get it working (similar to the CSharp generator?)
>
>
>
I don't know, give it a try... My feeling is that it will just use the
first it finds
or show duplicate modules. Either would be OK for getting started.

>
>>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.
>>
>>
>
>I know about the existence of the java generator and import. In the java_rte
>directory however I can only see code for the dialog and an empty rte/
>directory. Where's the actual logic? Or is the RTE supposed to simply regenerate
>code when the diagram changed and vice versa? Or is the generator more intelligent
>than I thought and it works incrementally?
>
>
The thing is that they have implemented it according to the JSR 26 (see
http://argonauts-lif​e.blogspot.com/index​.html#2005-05-31). For this they
store
everything the first time you reverse and then, when the code is generated
again, only delta stuff is generated. So, the logic in RTE is "in what
direction
do you want to sync this file / class?" The generation uses everything that
was first reversed, including "generation" of the previously reversed
methods,
which should be equal to the original content - to the white space.

>PS: Is there a place where the concept of the 'Notation's occuring everywhere in
>modules is explained? I currently can't figure out what a Notation is, what it's
>good for and why I have to care about it all.
>
>
Notation shows the diagrams according to the chosen notation: UML, java,
C++,
etc.

I'm interested in your interest in working with the java RTE modules.
Java 5
features support is one big must that we (ArgoUML) must do. One
big thing for this is the support of parameterized classes in ArgoUML.
After finishing
some things in the C++ module I must tackle this
 (http://argouml.tigri​s.org/issues/show_bu​g.cgi?id=1446) for being used
in the
C++ module. It is reused without effort in the java module.
Upgrading to ANTLR 2.7.5 and aligning the java grammar with the latest
found in
the ANTLR sharing zone is another. This is java specific.

That said, this work, if it is done the way others did it isn't very
interesting for
a thesis. One thing that could be different is to make reverse
engineering by
AST (Abstract Syntax Tree) processing instead of callbacks from the
parser. Much more decoupled and
gets you more flexibility in handling the context. The context is
something that
could be taken care using AOP (Aspect Oriented Programming). This is a
production
use of AOP instead of the common trace, logging or simple debugging uses.

The above isn't certainly something really new, many people have done it...
You may also play around with MDA concepts and development.
In my blog I describe this idea of
MDA specification and development of programming languages. It might be
overkill
as a diploma thesis, but, it is certainly something new! (See
http://argonauts-lif​e.blogspot.com/index​.html#2005-05-04).

Well, don't know if this line of discourse helps or confuses ;-))...
Just take them as
proposes of a person who wished to have more time to explore his crazy
ideas and
is trying to push them to a poor victim that was just inquiring about
some module
workings!

--
Luis Sergio Oliveira

« Previous message in topic | 6 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: