You can import code from a IBM® Rational Rose® model
into your imported Rational Rose model
in IBM Rational® Rhapsody®.
Importing code from a Rational Rose model
means creating a temporary reverse‑engineered package from the source
code that was generated from Rational Rose and
manually changed after generation.
Note the following
points about code import:
- Before doing code import, turn off DMCA and, if
open, close the Active Code View window.
- DMCA (dynamic model‑code associativity) is the
function in Rational Rhapsody that
changes the code of a model to correspond to the changes made to a
model in Rational Rhapsody.
To turn off DMCA, choose .
- To close the Active Code View window, choose . (A check mark should not appear next to this menu
command when the window is closed.)
- When you have imported the code for the imported Rational Rose model,
do not generate code for the imported Rational Rose model
in Rational Rhapsody while
the reverse‑engineered package still exists in the model. You want
to avoid situations where, for example, two classes of the same name
try to generate code into the same source file, which could corrupt
the model if the file is then roundtripped. To avoid this problem,
generate code only after the operation bodies have been merged into
the imported model and after the reverse‑engineered package has been
deleted from the model.
- Be careful as to which classes/objects are assigned
to the existing components before code generation after deleting the
imported‑code/reverse‑engineered package.
To import code from a Rational Rose model,
use the Rational Rhapsody Reverse
Engineering tool. To open this tool, choose . For information about how to use the Reverse Engineering
tool, see Reverse-engineering legacy code.
Once you have imported the code, you
can merge it into your imported Rational Rose model.
See Merging imported code into an imported model.