[Uml-devel] Code generation proposal, take 3

Brian Thomas thomas at mail630.gsfc.nasa.gov
Wed May 14 12:03:06 UTC 2003


	Hi all,

	I've been pulled away from doing some work on Umbrello for a while,
	as well as put off by the instability of the code, in particular the dialogs,
	but that now seems to be much better (and I can save my UML diagrams
	once again too :).

	So I guess I am saying that I intend to persue some code generation changes
	for Umbrello. Having been looking at the list, and with my own needs in mind,
	I put together a couple of things which, I hope, will illustrate more or less what
	I want to do. In this mail, I enclose a list of requirements which I want to satisfy.
	I will follow up this mail with an xmi file detailing the code changes that I wish
	to do in order to meet these requirements.

	Comments on both are welcome. My overall plan of action is to focus on Java
	and C++ code generation. I hope to modify the XMI file structure so that I can
	store needed parameters and user-specified code there (and no, I dont have
	any preferred structure for that in the XMI yet, so let me know your desires on
	this if you care about it).

				Regards,

					=b.t.


Requirements on Code Generation Improvement:

	Top-level Requirement:

	0. Allow user to better control code generation for all supported languages.

	Specific requirements that flow from this:

	1. Easy user interface.
               A. Use existing UML class/association popup dialogs for controlling code generation. 
               B. Allow user to insert specified code in methods/operations with interface.
               C. Allow user to preview code to be generated with interface (NOT necessarily EDIT this code however).
               D. General enought that it may work with all supported languages (I see potential difficulties
                    with supporting XMLSchema, for example)
               E. User should always have easy way to be aware of active language.

        2. Support session to session usage (e.g. ability to store code generation parameters)
              A. Changing active language should always force user to store parameters for last language.

	3. Better Code generation control.
            A. Support scoped control of code generation parameters. In other words, I can set package
                 level controls but have the ability to override them for a particular UMLClass or UMLObject
                 as the need arises.
            B. Support language specific controls (e.g. virtual methods in C++)
            C. Support auto-generation of methods  (e.g. in most languages this means ability to auto-
                  generate accessor methods)
            D. Intellegent collision resolution between away user-specified code and that which is
                 auto-generated for methods/operations (this is more or less a sub-requirement for 3C)
            E. Maintain current code generation control (e.g. header file stuff)


	An optional requirement is that outside documents could be auto-generated and controlled from
	the Umbrello tool. Examples of what I mean are things like Makefiles. Im not sure about this, and
	perhaps it may be left until Umbrello version 2 to be addressed.
        



-- 

  * Dr. Brian Thomas 

  * Code 630.1 
  * Goddard Space Flight Center NASA

  *   fax: (301) 286-1775
  * phone: (301) 286-6128

The most important early product on the way to developing a good product
is an imperfect version.





More information about the umbrello-devel mailing list