tags:

views:

452

answers:

2

I have started using Star UML application and its great. Is there a way to add get/set functions and foward/reverse engineer the code.

Thanks

A: 

I don't think that there is an easy way for automation in generating getters and setters. The development of StarUML stopped 4 years ago. An alternative would be nice.

brunce
A: 

Create an operator then set the stereotype to CSharpProperty.

Example:

  1. Right-click the class in the Model Explorer
  2. Select Add -> Operation
  3. In the property pane add the CSharpProperty stereotype.
  4. Add a "return" parameter (right-click the new operation and select Add -> return)
  5. Set the Type to the property type (e.g. int, string, etc.)
  6. Set the DiretionKind to Return

The above steps should produce C# code with both an accessor and modifier when StarUML generates the code.

drewberk