IBM Support

How to write into the Rhapsody output window using Java API

Question & Answer


Question

How do you write information into each tab of the output window in IBM Rational Rhapsody using the Java API?

Cause

There are 6 tabs in the Rational Rhapsody output window:

  • Log
  • Check Model
  • Build
  • Configuration Management
  • Animation
  • Search Results

There is no documentation which explains how to write the information.

Answer

Using the Java API, you can only write or clear the following output windows:

  • Log
  • Build
  • Configuration Management
  • Animation

API Methods

Use the following methods to write and clear the output window.

  • IRPApplication.writeToOutputWindow(java.lang.String title, java.lang.String outputStr)
  • IRPApplication.clearOutputWindow(java.lang.String title)

Examples:

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

IRPApplication app = RhapsodyAppServer.getActiveRhapsodyApplication();
app.writeToOutputWindow("Log","this information will be output into the [Log] tab.");
app.clearOutputWindow("Log");

app.writeToOutputWindow("Build","this information will be output into the [Build] tab.");
app.clearOutputWindow("Build");

app.writeToOutputWindow("Configuration Management","this information will be output into the [Configuration Management] tab.");
app.clearOutputWindow("Configuration Management");

app.writeToOutputWindow("Animation","this information will be output into the [Animation] tab.");
app.clearOutputWindow("Animation");

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.5.3;7.5.3.1;7.5.3.2;7.5.3.3;7.6;7.6.0.1;7.6.1;7.6.1.1;7.6.1.2;7.6.1.3;7.6.1.4;8.0;8.0.1;8.0.2;8.0.3;8.0.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21649496