Adding elements to Android applications

Once you have associated an Android project with a Rational® Rhapsody® model, you can add new generic or Android-specific elements to your model.

Before you begin

This topic assumes that you have already created an Android project and a IBM® Rational Rhapsody project in Eclipse and have established an association between the two projects. If not, see Creating a new Rational Rhapsody Android project and Importing an existing Android application into Rational Rhapsody.

About this task

To add classes and other elements to your model:

Procedure

  1. Use the Rational Rhapsody pop-up menus or drawing tools to add the element to the model. If you are using the DMCA feature (Synchronizing between models and code ), the code is automatically generated in your Android project. If DMCA is turned off, select one of the code generation options from the Rhapsody menu. The generated code files will be displayed under your Android project.
  2. Alternatively, add the element to your code using the Eclipse pop-up menus. If you are using the DMCA feature, the element is automatically added to your Rational Rhapsody model. If DMCA is turned off, select one of the roundtrip options from the Rhapsody menu. The element is displayed as part of your model in the Rational Rhapsody browser.

About this task

To add Android-specific elements, such as an AndroidProvider:

Procedure

Add the element to your Android project in Eclipse, using the AndroidManifext.xml tabs. If you are using the DMCA feature, the element is automatically added to your Rational Rhapsody model. If DMCA is turned off, select one of the roundtrip options from the Rhapsody menu. The element is displayed as part of your model in the Rational Rhapsody browser.

Feedback