Bug 87179 - How about round-tripping for C++ and Java?
Summary: How about round-tripping for C++ and Java?
Status: RESOLVED DUPLICATE of bug 53382
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-14 05:06 UTC by keith Burden
Modified: 2004-08-17 11:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description keith Burden 2004-08-14 05:06:40 UTC
Version:           1.3 (using KDE KDE 3.2.2)
Installed from:    SuSE RPMs
OS:                Linux

How about "round-trip" engineering?

Could you please add method/member_function code entry to the class/operation panel?
And could you retain method code when importing?

I am currently using Rational_Rose and Visio_UML which both do round-trip for
well formed code. This is very handy when doing iterative development and you
want to retain code changes made outside the modeling tool.

Currently your tool is forward engineering only which severely limits 
what is otherwise quite a beautiful tool. 

It does UML quite simply without all the added bells and whistles (expensive crap) 
that Rat_Rose and Pisio tack on. Keepup the great work!
Comment 1 Sebastian Stein 2004-08-15 11:55:55 UTC
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

Comment 2 keith Burden 2004-08-16 03:05:41 UTC
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


Comment 3 Sebastian Stein 2004-08-17 11:59:45 UTC
Please read my comment again. I said I think this kind of _wish_ already exists in the bug tracking system. And indeed it does as bug 53382. And you asked for a possibility to insert code for operations. This feature already exists in Umbrello, if you have turned on C++/Java code generator.

So I don't said that round-tripping already exists. Please feel free to send in patches!

*** This bug has been marked as a duplicate of 53382 ***