Rational Software Corp.

TOC PREV NEXT INDEX



Basic Extensibility Concepts


Contents

This chapter is organized as follows:


Rational Rose Extensibility

Rational Rose provides several ways for you to extend and customize its capabilities to meet your specific software development needs. You can:


The REI Model and Rose Extensibility

The purpose of Rose is to enable component-based software development. As you would expect, the Rose application is itself component based, and is defined in the Rose Extensibility Interface (REI) Model.

The REI Model is essentially a metamodel of a Rose model, exposing the packages, classes, properties, and methods that define and control the Rose application and all of its functions.

Figure 1 shows the logical packages that comprise the Rose Extensibility Interface Model. Refer to the online Help for details on the classes contained in each package, and the properties and methods defined for each class.

Figure 1 Rose Extensibility Model -- Logical View

You communicate with the Rose Extensibility Interface through Rose Scripts or through Rose Automation. In either case, you will use the REI calls defined in the Rose Extensibility Model and described in the online Help.

Figure 2 shows the components of Rose and the Rose Extensibility Interface, and illustrates the relationships between them. These components are:

Figure 2 Rose Application and Extensibility Components


Rose Scripting

The Rose Scripting language is an extended version of the Summit BasicScript language. The Rose extensions allow you to automate Rose-specific functions and, in some cases, perform functions that are not available through the Rose user interface.

The Rose Script Editor runs in the Rose environment and provides access to the scripting environment. Start the script editor by clicking either Tools > New Script or Tools > Open Script.

Rose provides a set of sample scripts that you can use as a base from which to create your own scripts.

Use the online BasicScript and Rose Script Language References for complete script language information.


Rose Automation

Rose Automation allows you to integrate other applications with Rose in two ways:

Rose Automation is accessible to automation controller environments, such as Visual Basic, EXCEL, Summit BasicScript, Softbridge Basic Language, C, C++, and others.

Note: You may need to adapt the syntax listed for each REI property and method to your particular programming language. If the listed syntax does not meet your needs, consult your programming environment's Help, programming language books, and outside documentation on the subject.


Rose Add-In Manager

The Rose Add-In Manager provides you with the facilities required to install extensions you create as add-in components in the Rose environment.

In the extensibility environment, you can manipulate add-ins using calls to the RoseAddInManager object.


Default Properties and Property Sets

Each Rose model has its own default properties. These default properties are defined in a property file and are grouped into sets based on:

Note: You can define multiple sets of default properties for the same tool and model element. For example, you might want one set of properties for a class with a stereotype of Actor and a different set of properties for a class with a stereotype of Interface. Both of these sets are still considered default properties in that they are predefined for the model. Defining multiple sets saves you work by minimizing the need to override properties later.


Rose Extensibility Type Libraries

Loading a type library for Rose automation allows you to use Rose class names to access the Rose Extensibility Interface from your programming environment.

For example, if you are working in Visual Basic, instead of using the Basic object type Object, you can use the name of the actual Rose class. You can also check the syntax of the properties and methods at compile time (early binding) instead of when the code is executed (late binding).

If you are working in Visual C, you can import RationalRose.tlb into an MFC project. This generates ColeDispatchDriver subclasses for each REI class, and methods allowing access to REI properties and methods.

Important: When you specify a Rose class name in an automation environment, you must add the prefix Rose to the class name, unless the class name itself contains the word Rose already. (For example, the Rose class, RoseItem, does not require a prefix.) This prefix prevents class name conflicts across applications.

For example, in Rose Script, the syntax for declaring a Category variable is:

Dim theCategory As Category

In Rose Automation, the syntax for declaring a Category variable is:

Dim theCategory As RoseCategory

For details on using type libraries in any automation environment, refer to the documentation for your particular programming environment.


Rational Software Corporation  http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX