Code generation and Associations. XMI2Code needed? or is libcodegenerator a mistake? (Was: Re: [Uml-devel] Association Combination bugfix patch)

Jonathan Riddell jr at jriddell.org
Wed Feb 26 17:24:15 UTC 2003


> > Remind me again which presentation errors those are.
>
> 	Umph. I can only recall one at this moment: when you move class b, the
> 	association name doesnt coorectly follow the association line. I cant
> 	verify anything right now since Im working from home today, and the code
> 	is "at work".

Havn't noticed that as a problem but maybe I will now you've pointed it
out.

> > There's some big inline methods in association.h which I'd like to move to
> > association.cpp, Brian do you have any more work which might get out of
> > sync if I did that?
>
> 	Oh, thats cool. Im working on the Java code writer right now and perhaps
> 	adding a documentation editing box to class attributes properties box.

Great.

> 	Speaking of the Javawriter and codegeneration in general, Im
> wondering if it is truely worth it to have a
> 	separate xmi2code project running/competing with a "native"
> codegenerator library? Why
> 	duplicate efforts here? If xmi2code is kept, shouldnt we attempt
> to invoke it from umbrello so that
> 	the code produced is consistent? Or perhaps xmi2code can read in
> libcodegenerator so consistent
> 	code is produced? (Hmm. I need to check this out...perhaps
> xmi2code already works that way).

I've not been very involved with xmi2code and I don't really know how it
could be used by Umbrello.

> 	That aside some things which I see are missing in the Umbrello
> codegeneration are the following:
>
> 	= lack of needed properties dialogs to allow editing of some
> properties (in particular, 'documentation',
> 	   perhaps there are others? I dont know yet..).

Agreed.

> 	= ability to have template for particular type of code
> generation (for example, a "JavaWriter"
> 	   template which directs how Java code is to be produced).

Don't quite understand what you mean there.

> 	= keeping hand edited code in output files

That's the biggie.  I guess it could use the import interface (if/when it
exists) to check for differences between what it's about to output and
what it currently in the file and only output the differences into the
file (assuming the file exists).  Tricky, but would be nice.

> 	= allowing configuration of writer-specific settings (such as
> the template to use) in umbrello.
> 	   (e.g. the codegenerator class should have some hook which
> allows it to invoke a language-specific
> 	   properties dialog box when asked).

A bit like bug 55249?
http://bugs.kde.org/show_bug.cgi?id=55249

Jonathan Riddell






More information about the umbrello-devel mailing list