Editing code using the Eclipse editor

About this task

Note: This method for editing code using the Eclipse editor is for the Rational® Rhapsody® Platform Integration of Eclipse.

To display generated code for a specific element in the code editor

Procedure

  1. In the model browser, right-click an item and select Edit Code to launch the corresponding source code in the Eclipse code editor.
  2. On the Eclipse code editor, highlight any items of interest and right-click to display the editing menu.

To launch the Eclipse code editor from a diagram element

Procedure

  1. Open the diagram.
  2. Right-click an item in the diagram and select Edit Code.
  3. The Eclipse code editor opens.

    If you are editing code and need to see an item in the project, typically in the model browser:

  4. Highlight the item in the code.
  5. Right-click and select Show in and then select one of the options. The option listed on this submenu are controlled by the type of project displayed. For example, this option list is for a C++ project:
    • Model Browser
    • C/C++Projects
    • Outline
    • Navigator

To see the code automatically for a selected model element

Procedure

  1. Click the Link with Editor button located at the top of the Eclipse model browser.
  2. Click an item in the model browser and notice that the code for the item is immediately displayed and highlighted in the Eclipse code editor.

Feedback