[Uml-devel] Code generation proposal, take 3

Luis De la Parra Blum lparrab at gmx.net
Thu May 15 11:37:25 UTC 2003


On Thursday 15 May 2003 18:08, Brian Thomas wrote:
> view on scope of the work. It sounds to me that you are having a broader
> scope, with issues of code import and roundtripping that I dont want to
> address at this time.

well.. as I understood it, Pascal is not talking about round-trip or code 
import at all.. he just meant "non destructive" code generation. that would 
be pretty easy to implement *if* you save the generated code in the document 
xmi file each time you generate a code.
then, the next time you generate, you do your generation as normal (using 
Brian's code generation enhancements )  with the *only* difference, that you 
dont write directly to a file but to a string or some other kind of buffer. 
when you are done, then you do a 
  KProcess p <<"merge lastgeneratedfile targetfile mynewgeneratedfile" ;
  p.start( );

that is, you write to a stream or temp file, and let merge write the real file
then just ask the return code, and if there were conflicts, start kompare or 
an editor, or just give a pop up
  " Generation Finished - there were conflicts at line 56, please check"

regards

luis




More information about the umbrello-devel mailing list