[Uml-devel] codegenerators

Sebastian Stein seb_stein at gmx.de
Sat Apr 5 08:32:02 UTC 2003


Jonathan Riddell <jr at jriddell.org> [030405 18:19]:
> > 	3. Be able to insert arbitrary code/text into almost any point in a file.
> 
> I'm not convinced at the need for this /within/ Umbrello.  If the file is
> edited outside Umbrello the changes shouldn't be overwritten but I'm not
> convinced for a need to start an editor from Umbrello.  Don't know if
> that's what you meant or not.
> 
> ... 
> I'm not even sure that you want to go that far. If you start having any
> sort of editor people will expect full editor functions else they may as
> well use their normal editor.  I'd say just let them set the
> configurations and let them add code however they normally would.

I think you misunderstood the thing a little bit. They should of course use
their favorit editor as normal. But the editor is called from within
Umbrello and Umbrello gives a prepared file to the editor. Imagine a class A
with operations Op1 and Op2.

In the class diagram or in the property dialog of the class you click on
A::Op1 and Umbrello opens the editor with just this one operation! Not the
whole class, just the code for Op1, so something like:

void A::Op1(int para1)
{
	// add your code below
	// Changes above wouldn't be recognised and will be lost!
}

Now you can start coding. When finished you save the file and close your
editor. Umbrello will notice this and add the new code to the internal
representation (and write it into the xmi file).

Now you click on Op2 and maybe you allready added code this function, so the
editor will pop up and show you:

void A::Op2(short para1)
{
	// add your code below
	// Changes above wouldn't be recognised and will be lost!

	cout << "para1 = " << para1 << endl;
}

Maybe have a look at the email user agent mutt. You can browse through your
mails with mutt, but to edit a new mail it calls an external editor.

Steinchen
-- 
Umbrello UML Modeller
Description     : UML diagram drawing tool for KDE with code generation
Homepage        : http://www.umbrello.org/




More information about the umbrello-devel mailing list