[Uml-devel] [Bug 87179] How about round-tripping for C++ and Java?

keith Burden keithburden1 at comcast.net
Tue Aug 17 02:37:21 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=87179      




------- Additional Comments From keithburden1 comcast net  2004-08-16 03:05 -------
Sebastian Stein wrote:

>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>      
>http://bugs.kde.org/show_bug.cgi?id=87179      
>
>
>
>
>------- Additional Comments From seb_stein gmx de  2004-08-15 11:55 -------
>keith Burden <keithburden1 comcast net> [040815 11:46]:
>  
>
>>How about "round-trip" engineering?
>>    
>>
>
>I'm pretty sure this kind of wish already exists...
>
>  
>
>>Could you please add method/member_function code entry to the class/operation panel?
>>    
>>
>
>It already exists if you have enabled the C++ or Java code generator.
>
>
>Sebastian
>
>  
>
---------------------------------------------------------------------------
Sebastian,

Round-tripping is available for attributes and method/function declarations
but NOT for methods/functions -->BODIES<-- ( that is to say real code).

In 1.2 you can round-trip ONLY the  method/function
declarations/definitions but NOT their bodies.

If you don't believe me then try:
    1.In Umbrello make a new model.
    2.Define a class with at least one member function.
    3.Export/generate the class.
    4.Add some trivial code to that function ( something like: printf( 
"hello\n" ); )
    5.Define a new model in Umbrello.
    6.Import the class you just modified from #4 (you only read the .h 
file!)
    7.Export/genererate the class again to a NEW! location.
    8.Save the model.

When you look at the model.xmi file you CANNOT find any of the code
you added in step #4 in the UML:Operation element for the method.
As a matter of fact, you can't find "printf" anywhere in the model.
Also if you inspect the class generated from #7 you will see the
member fucntion is again EMPTY. The code you added in #4 is GONE.

Therefore the member function code you added in step #4 is NOT present
in the model and is NOT in the newly generated class.

I did notice that if you generate in step 7 to the same directory
used in step #3 that the code APPEARS to be intact. But since
I can't find the added code in the XMI model file after importing,
the code is NOT really in the model. This is required for REAL
round trip engineering.

So are you saying that round-tripping is present only because
you don't overwrite the existing .cpp file?

If you check:
 http://geeksoc.org/~jr/umbrello/kdesdk/apidocs/umbrello/html/classUMLOperation.html
You will see that UMLOperation has no attributes to store any code!

According to the OMG XMI 1.2 spec, the code should have been stored
in UML:Operation.method.body  but I cant find this or any UML:Method
elements in the model.

Have I mnissed something?? Is round-trip in 1.3?? What's going on?

Again you have a really great tool that needs just a FEW things to 
compete with Rational or Visio.
Sorry about the long message but I wanted to be specific.

Thankx
Keith




More information about the umbrello-devel mailing list