You can add code (C, C++, Java and UAL) to a capsule-based
UML model by inserting code into the Code View editor, a built-in
snippet editor, or an external editor of your choice.
Synchronizing source code in capsule-based UML models
You can synchronize any changes that you make to the code
(C, C++, Java and UAL) with your capsule-based model. When you change
the generated source and save it, the system synchronizes the generated
source with the model snippets. A dialog box shows all the changes,
and you can commit the changes to the model.
Editing code in external editors for capsule-based models
When you edit the code (C, C++, Java and UAL) for capsule-based
UML model elements, you can use an external editor of your choice.
You must first set a preference to use an external editor.