Rational Rhapsody projects Code generation In each of the language versions of Rational Rhapsody, you can generate code for units in each of the three languages - C, C++, Java. For code generation to work properly, you have to adhere to the following rules: Љ To generate code for units in a certain language, the appropriate language must be specified at the component level. Љ Elements included in the scope of a component must be of the same language as the component.
(If other language elements are included in the scope, a warning will be issued during code generation.) Note If you selec t All Elements as the scope, Rational Rhapsody will automatically include only those units whose language matches that of the component. If you choose Selected Elements , Rational Rhapsody will only display those units whose language matches that of the component. However, if you selected specific elements, and then changed the language of the component, Rational Rhapsody will not deselect these non-matching units. When you attempt to generate code with such a component, you will receive error messages.
The same principle applies to the Initial Instances specified for the configuration. Language-specific differences in Rational Rhapsody The Features window differs from language to language. For each unit in your model, the appropriate Features window is displayed. Similarly, the properties displayed reflect the language of the selected unit. Non-unit elements If you try moving an element not saved as a unit to a package with a different language, the language of the element will be changed to that of the receiving package after you confirm that you want to move the element. Reverse engineering The reverse engineering mechanism always uses the language of the active component.
When you use the Reverse Engineering window to add files to reverse engineer, the default file filter used will reflect the language of the active component, for example, *.java if the active component is associated with Java. 270 User Guide