As far as I can see, roundtrip updating diagrams to code is only officially supported on Visual Studio extension. However, we found the extension to be very brittle and often not functional.
Rational Rose had a different way to achieve code updating using comments:
public class Person {
private String name;
private int age;
//## operation greet()
public void greet() {
//## begin greet%1234567890.body preserve=yes
System.out.println("Hello, my name is " + name);
//## end greet%1234567890.body
}
}
The comments followed a specific pattern and told Rational Rose which sections of code would be overwritten and which would not be.
We would like to see more official support for roundtrip updating (specifically, ways to prevent overwriting parts of code when exporting code from UML diagrams), which is crucial for Model-Driven Development.
