![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
A
- B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z
Rose Developer Tutorial The following tutorials are included in this document:
- Tutorial 1: Forward Engineering - Overview
- Tutorial 2: Reverse Engineering - Overview
- Tutorial 3: Architectural Components - Overview
- Tutorial 4: Fast-Path Recompilation - Overview
- Tutorial 5: Multiple Users & Team Development - Overview
Each tutorial provides a detailed step-by-step description for a typical scenario for using Rose and Apex C++.
- Use these tutorials for:
- Learning about integration between Rose and Apex C++
- Learning about features of Apex C/C++
- Learning about features of Rose/C++
- We will be building part of the model presented in the "Ship It Now!" white paper.
Setup advice for users of a previous version of RoseIf you are using a previous version of Rose, keep the following in mind:
- Remove your old .rose.ini so you are sure to get the correct .rose.ini for this version of Rose Developer. Your .rose.ini file will be located in your home directory.
- Remove the .WindU file and the .windu directory so those are created new. These will be located in your home directory.
Tutorial 1: Forward Engineering - OverviewThis tutorial covers the following:
- A simple forward engineering example
- Functionality
- Creation of subsystems and views
- Version control of generated files
- Navigation between Rose and Apex
- Compilation, linking, and execution
- Benefits
- Integration between Rose and Apex
- Fewer manual operations/more automation
Forward Engineering: Create a model
- 1. . Start Apex.
- 2. . In the initial start-up window type a directory to visit, your home directory for example.
- 3. . Click the Visit button.
- 4. . In the Apex Directory window that just appeared, create a new directory where you want to perform this tutorial: Select the File > New > New Directory menu item, enter the name, and click on the OK button.
We will refer to the directory you just created as <tutorial_directory>.
- 5. . After you create the new directory, another directory window will appear for that directory. You can close the first Apex Directory window (it should have your home directory path in its title bar).
- 6. . Start Rose from Apex by selecting the Rose > C++ > Start Rose menu item in the Apex Directory Viewer window.
- 7. . If it appears, click the OK button on the "Information ...has been added to registry" window.
- 8. . If you are using a demo license, a License Manager Message window will appear, click OK on this window
Forward Engineering: Preparing the model for initial save
It is beneficial to have one package that has visibility to all packages within the model. We will call this package "Top_Level". The model should be saved once the Apex structure is created. This sets up the model properly for use later in a team environment.
- 1. . In Rose, create a package by selecting the Tools > Create > Package menu item and then click the left mouse button in the Class Diagram:Logical View/Main window.
- 2. . Name the package by selecting the name, and then typing in the new name Top_Level.
Forward Engineering: Create a Package
- 1. . In Rose, create another package (Tools > Create > Package) in the Class Diagram > Logical View/Main window.
- 2. . Name the package by clicking on the "NewPackage" text, and then typing E-Mail.
- 3. . Select the Tools > Create > Dependency menu item, and draw an "import relation" (dashed line with arrow) from Top_Level to E-Mail.
Forward Engineering: Specify directory
In this section you will specify the directories where subsystems and views are placed when created.
- 1. . Be sure nothing is selected by clicking on the white background of diagram, and then select the Tools > Model Properties > Edit menu item, or press the F4 button.
- 2. . Change the C++ tab's Type field to Project using the pull down selector.
- 3. . Rename the "Directory" property from "AUTO GENERATE" by clicking twice on it (not double-clicking), and typing in the fully qualified pathname to the directory you created at the beginning of this tutorial (<tutorial_directory>).
- 4. . Click on the dialog box to complete the entry.
- 5. . Click OK to commit the change.
Forward Engineering: Create the initial Apex structure for the Model
- 1. . Select the window with the two packages (Class Diagram > Logical View / Main).
- 2. . Select both packages (Control-A, or press and hold the left mouse button and draw a box around them).
- 3. . Select the Tools > C++ > Code Generation menu item. This creates a subsystem and view in Apex for each package, since we did not visually model any classes, Rose will generate no code.
- 4. . Look in the Apex Message Window to see what susbystems and views will be created.
- 5. . Click Yes in the small dialog box when Rose asks if you want to create two subsystems and two views. You may need to move a few windows if the dialog box is hidden.
- 6. . Click OK as each of the two Apex New View dialog boxes appear.
- 7. . Watch the subsystems and views get created in the Apex Message Window. This will take a minute.
You may close any message window (other than the original message window) with Done in the title bar
You will get an error message in Rose letting you know that no code was generated. This happened because there are no classes in the model.
- 8. . Click Close in the Rose Code Generation Status window.
- 9. . Bring up the Log window in Rose and verify that the error message mentioned in step 7 is the only error you received.
- 10. . Close the Log file.
- 11. . Save the model by selecting File > Save. Save the model (call it "tutorial1.mdl") inside <tutorial_directory>/Top_Level.ss/<userid>.wrk.
You now have the architectural structure in place to create your application.
Forward Engineering: Create a Class
- 1. . Open the package E-Mail with one of the following three methods:
- a. . Deselect everything by clicking on the empty white background of the diagram, and then double click on the package icon.
- b. . Select the package, and from the menu bar select Browse > Expand.
- c. . Select the package and enter Control-E.
- 2. . In the new Class Diagram ("Class Diagram: E-Mail / Main") create a class by either selecting the Tools > Create > Class menu item, or click the "class" icon on the toolbox menu.
- 3. . Name the class by typing in the name getmsg.
Forward Engineering: Adding Attributes
Add an attribute (data member) to getmsg:
- 1. . Open the Class Specification window by selecting Open Specification from the right-mouse menu, or by double-clicking on getmsg.
- 2. . This step is optional:
Add some documentation for the class in the Documentation area (e.g. "The getmsg class is responsible for useful and wondrous things").- 3. . Click the Attributes tab in the Class Specification for getmsg window.
- 4. . With your mouse on the white part of the box, click the right-mouse button and then select "Insert" to insert a new attribute.
- 5. . Give it a "Name" of userID.
- 6. . Right-mouse click on the name (userID) and select Specification to bring up the Attribute Specification window.
- 7. . Give it a "Type" of int.
- 8. . Optionally, add some documentation in the Documentation box.
- 9. . Dismiss the Attribute Specification window via the OK button.
Forward Engineering: Adding Operations
- 1. . Add an operation (member function) to getmsg:
- a. . Click the Operations tab in the Class Specification for getmsg window.
- b. . From the right-mouse menu, select "Insert" (this will insert a new operation).
- c. . Replace the highlighted "opname" with logon.
- d. . Bring up the Operation Specification window by double-clicking on the name (logon), or select Specification from the right-mouse menu.
- e. . Give it a "Return class" of int (click on box and type it in).
- f. . Optionally, add some documentation in the Documentation box.
- g. . Dismiss the Operation Specification window by clicking the OK button.
- 2. . Close the Class Specification window by clicking the OK button.
- 3. . The new attribute and function should appear in the class icon. If not, select Show All Attributes and Show All Operations from the right-mouse menu when selecting getmsg.
You now have a very simple model in Rose.
Forward Engineer: Enhance the Model
This procedure enhances the model for use in Tutorials 3, 4, & 5. If you will not be doing those tutorials, you may skip this section.
- 1. . In Rose, in the Class Diagram > Logical View / Main window, add two more "packages", name them "TCP_UDP" and "IP" (select the package icon from the toolbox menu, or select the Tools > Create > Package menu item).
- 2. . Select the Tools > Create > Dependency menu item and draw a dependency from E-Mail to TCP_UDP, and from TCP_UDP to IP.
- 3. . Since top_level must have visibility to all the system's packages, add dependencies from top_level to TCP_UDP and from top_level to IP.
- 4. . Double click the TCP_UDP package icon to bring up the TCP_UDP main class diagram window.
- 5. . Create a class, and name it tcpintface.
- 6. . In package IP main class diagram window, create a class, and name it ipintface.
Forward Engineer: Create the Apex structure for the Model
- 1. . Select the window with the four packages (Class Diagram > Logical View / Main).
- 2. . Select all four packages (Control-A, or draw a box around them with the left-mouse button).
- 3. . Select Tools > C++ > Code Generation. This creates a subsystem and view in Apex for each package, and creates the skeleton of the class getmsg.
- 4. . Look in the Apex Message Window to see what susbystems and views will be created.
- 5. . Click Yes in the small dialog box when Rose asks if you want to create two subsystems and two views. You may need to move a few windows if the dialog box is hidden behind one.
- 6. . Click OK as each of the two Apex New View dialog boxes appear.
- 7. . Watch the subsystems and views get created in the Apex Message Window. This will take a minute.
You may close any message window, except for the original message window, with Done in the title bar.
- 8. . Version control the new files by clicking OK when the Apex Check Out dialog box appears.
- 9. . Watch the header and source code files get version controlled and checked out in the Apex Message Window.
- 10. . Click Close in the Rose Code Generation Status window.
- 11. . From the File menu, select Save to save the model.
Forward Engineer: Create executable code
- 1. . Select the class getmsg in the Rose diagram by clicking on it.
- 2. . Edit the code for getmsg in an Apex editor by selecting Tools > C++ > Browse Body, or typing Ctrl+K.
- 3. . The Apex Editor will appear with the getmsg.cpp source.
- 4. . Make the file editable by clicking the Edit button on the button bar or select the File > Edit menu item in the editor.
Towards the beginning of the file, after the line //## begin module%<unique hexidecimal ID>. includes preserve=yes, add the line #include <iostream.h>.
The new section should look like:
//## begin module%<unique hexidecimal ID>.includes preserve=yes #include <iostream.h> //## end module.includes
<unique hexidecimal ID> is just that, a unique hexidecimal number that is supplied by Rose.
- 5. . In the constructor, "getmsg::getmsg()" after the line //## begin getmsg::getmsg%.body preserve=yes, add the line cout << "creating getmsg class\n;
//## begin getmsg::getmsg%.body preserve=yes cout << "creating getmsg class\n"; //## end getmsg::getmsg%.body
- 6. . In the destructor, "getmsg::~getmsg()" after the line //## begin getmsg::~getmsg%.body preserve=yes, add the line
cout << "destroying getmsg class \n";
//## begin getmsg::~getmsg%.body preserve=yes cout << "destroying getmsg class \n"; //## end getmsg::~getmsg%.body
- 7. . At the end of the file, after the // Additional Declarations line, between the lines //## begin getmsg%<unique hexidecimal ID>.declarations preserve=yes and //## end getmsg.%<unique hexidecimal ID>declarations" add the following lines
int main () { getmsg getmsg_class; cout << "Hello Apex World!\n"; return (0); }
Forward Engineering: Compiling and linking
- 1. . Compile the code by clicking the Code button in the Apex editor window; this auto-saves the editing changes. Then click the Close button (you need not wait for the compile to complete).
- 2. . Ignore the warnings but check for errors. If there are errors the next step will help you understand them.
- 3. . From the Apex Code window you can navigate to warnings or errors through either of the following methods:
- a. . Double-click on the message line, either warning or error.
- b. . Select a message and then click the Visit button.
- 4. . Close the Code window.
- 5. . Link the code by doing one of the following instructions:
- a. . From Rose select getmsg and then the Tools > Apex > Compile > Link menu item.
- b. . From the Apex directory window, link the code by selecting getmsg.cc and then the Compile > Link menu item.
- 6. . Click OK in the Apex Link window, and then wait as the system rechecks your Tools > Compile > Link and links your program. Ignore any warnings; you may use the Remove Warnings button to insure that there are no errors.
- 7. . Close the Link message window.
Forward Engineering: Running the program
- 1. . Execute the program through one of the following methods:
- a. . From Rose, execute the program:
- i. .
Select getmsg.- ii. .
Select the Tools > Apex > Compile > Run... menu item.- b. . From Apex execute the program:
- i. .
Select the Navigate > Enclosing menu item.- ii. .
Shift-double click on getmsg* or select getmsg.cpp, and then select the File > Run menu item.- 2. . Click OK on the Apex Run window.
- 3. . Notice the output goes to the Apex Message Window.
Tutorial 2: Reverse Engineering - OverviewThis tutorial covers the following:
- Features
- Take the simple getmsg class created in Tutorial 1 and add a new method and attribute to it
- Display the changes visually in Rose
- Observe the simplicity for visualizing changes in source code
- Benefits
- Allows programmer to easily see abstraction of code
- Reflects actual code since it's based on compilation artifacts
- Facilitates communication by allowing architects, designers, and managers to understand state of the actual code under development
Reverse Engineering: Add new operation and attribute to code
- 1. . In Rose, select the getmsg class.
- 2. . Select the Tools > C++ > Browse Header menu item, or press Control-h. The header file for the getmsg class will appear in the Apex Editor.
- 3. . Click edit on the menu bar of the Apex Editor or select the File > Edit menu item. This makes the window editable.
- 4. . At the end of the public section, in the // Additional Public Declarations area, after the line //## end getmsg%<unique hexidecimal ID>.public add the following lines:
int new_getmsg_integer; int new_getmsg_func() { cout << "new getmsg func inline function\n"; return (0); }
Note: DO NOT ADD THESE LINES BETWEEN THE TWO COMMENTS!!! Add them AFTER //## end getmsg%<unique hexidecimal ID>.public
- 5. . Save the file, and close the editor.
- 6. . Compile the code and link: From Rose, select getmsg, and then Tools > Apex > Compile > Link.
- 7. . Click OK on the Link window.
The system will now spend some time recalculating dependencies and linking your code
Note: A side effect of compiling is the creation of a new version of the intermediate representation sienna. This forms the basis for visualizing your changes.
- 8. . Use the Remove Warnings button to hide any warnings
Reverse Engineering: Visualize the new view
- 1. . In the Apex Directory Viewer window expand E-Mail.ss.
- 2. . Select the view name (<userid>.wrk).
- 3. . Select the Rose > C++ > Visualize menu item.
- a. . This will begin the process of using the artifacts created and stored by the compilation, and reverse engineering them into a new Rose model.
- b. . Part way through a new application, the Rose Analyzer will appear. If you are using a demo license, you must dismiss the pop-up License Manager Message window in order to proceed.
- c. . The Rose Analyzer will automatically complete its operations. Do not intervene, it's automated!
- d. . This operation can take some time as it's doing a lot for you, all automatically!
When it's done, the new model will appear in Rose.
Reverse Engineering: See the changes
- 1. . In Rose, double click the E-Mail icon.
- 2. . Note the new attribute and operation in the class getmsg.
Round Trip Engineer: Update Original Model
Now you can update the original model! When you are done the original model will show the new operation and attribute.
- 1. . Make note of the name of the currently loaded model (<something>.red) and the directory path it is in (should be in the Apex Message Window).
- 2. . Load the original model, tutorial1.mdl.
- 3. . Select the File > Update menu item.
- 4. . Select the file <something>.red that you just created and made note of. It should be in the view, under
<tutorial_directory>/E-Mail.ss/<userID>.wrk/.Rational/Rose Models/<something>.red
- 5. . Click Close on the Rose Merge Status window.
Your original model will be updated with the new attribute and operation added to the getmsg class.
- 6. . Double click on the icon for package E-Mail, note the new attribute and operation.
Tutorial 3: Architectural Components - OverviewThis tutorial covers the following:
- Functionality
- Easy architecture specification from Rose diagram
- Architectural enforcement during Apex compile
- Architectural warnings from Rose
- Benefits
- Building reusable components
- Maintainable applications
Architectural Components: Modify the Model
- 1. . In Rose, make sure you have the tutorial1.mdl model loaded. It's not important if it includes the update to the design from the reverse-engineered code (Tutorial 2).
- 2. . Select the Browse > Class Diagram menu item. In the Class Diagram window, select "E-Mail". In the Class Diagram window, select "<New>". Then click on OK.
- 3. . Give the new diagram a title of "Architectural Components".
- 4. . In the Browser window (if not visible, make it so by choosing View > Browser), expand the "Logical View", then expand "E-Mail", "TCP_UDP", and "IP".
- 5. . Click and drag getmsg, tcpintface, and ipintface from the Browser window onto the new diagram (Architectural Components). The same functionality is available via the Rose pull-down Query > Add Classes....
- 6. . Add a one-way relationship from getmsg to tcpintface by selecting Tools > Create > Unidirectional Association, then drawing the relation from getmsg to tcpintface.
You have now added a relationship that is allowed according to our architecture - there is an "import" relation from E-Mail to TCP_UDP.
Architectural Components: Compile with Success
- 1. . Generate code for the modified getmsg class: select getmsg and the Tools > C++ > Code Generation menu item.
- 2. . You should receive 4 warnings, these are okay.
- 3. . Close the Rose Code Generation window.
- 4. . Compile that code (with getmsg still selected, choose Tools > Apex > Compile > Code).
- 5. . Click OK on the Apex Code window.
Note: Compilation is allowed, even though there are warnings reported, there are no errors). Clicking the Remove Warnings button on the Apex Code message window will make it easier to determine that there are no errors, only warnings.
- 6. . Close the Apex code message window.
Architectural Components: Further Modify the Model
- 1. . Add a Unidirectional Association from getmsg to ipintface by selecting the Tools > Create > Unidirectional Association menu item, then draw the relation from getmsg to ipintface.
You have now added a relationship that is not allowed according to our architecture - there is no direct "import" relation from E-Mail to IP.
Architectural Components: Visibility Violation Prevented
- 1. . Select getmsg and then Tools > C++ > Code Generation to generate code for the modified getmsg class.
- 2. . You should receive 8 warnings, these are okay.
- 3. . With getmsg still selected, choose Tools > Apex > Compile > Code to compile the code.
- 4. . Click OK to close the Apex Code dialog window.
Note: The compilation stops with an error, getmsg is not allowed to include ipintface.h because it violates our defined architecture.
- 5. . Select File > Close button to close the Apex Code message window.
"Why didn't Rose prevent this violation?" - because it may be necessary for a designer to temporarily violate some visibility constraints. Consider the case where the designer wants to create a diagram (that violates constraints) in order to show the architect why the architecture must be changed! If it were not possible to draw such a model, it would be much more difficult to get the point across.
However, Rose will tell us about such violations if we ask it to.
- 1. . In Rose, select the Report > Show Access Violations menu item. This brings up a list of violations. In our model there should only be one. Select that line and click Browse. Rose will bring up the diagram with the violation displayed, and box the violation with a red box.
- 2. . Click the Cancel button to close the Show Class Access Violations list box.
Tutorial 4: Fast-Path Recompilation - OverviewThis tutorial covers the following:
- Features
- How fast-path recompilation works
- How Apex uses semantic dependencies (rather than time-stamps) to determine which files need recompiling
- Benefits
- Ten times speed up in recompilations
- Fixing of problems in correct place
Fast-Path Recompilation: Enhance the Model
In most applications there are some number of header files that are included in almost every file. In this section we will set-up a small example of this.
- 1. . Go to the "Class Diagram: Logical View / Main" in Rose.
- 2. . Double-click on the IP package to bring up it's main class diagram.
You should already have one class, ipintface. We will be adding 4 more.
- 3. . Add classes routing, unique, ip2phy, and ip.
Note: We will be referring to both the package IP, and the class ip. These are different and should not be confused.
- 4. . Select the Tools > Create > Dependency menu item, and add an Import Relation from routing to ip, from unique to ip, and from ip2phy to ip. Holding the shift key down as you draw each relation will allow you to draw multiple relations without having to reselect Tools > Create > Dependency.
- 5. . In the class ip add a data member (attribute) called unique_number, make it an integer (Type of int).
- a. . Double click the ip class.
- b. . Click the Attributes tab in the Class Specification dialog.
- c. . Right click on the white space, and click the insert menu entry.
- d. . Rename name to unique_number.
- e. . Right click on unique_number, and select specification from the menu.
- f. . Make the type int.
- g. . Click on Public under Export Control to make its accessory functions public.
- h. . Click OK on each of the two specification dialog boxes.
- 6. . In routing, add a function get_the_ip_number, taking no arguments and returning an int. (The Operations tab may be accessed by double clicking the class routing. The type is accessed by right clicking on the newly created operation and selecting specification.)
- 7. . Select the classes and then the Tools > C++ > Code Generation menu item to generate code for all 4 classes.
- 8. . Click OK in the Apex Check Out window to place the files under source control.
- 9. . Click Close in the Rose Code Generation Status window.
- 10. . In Rose, bring up the Apex Editor on routing source code by selecting routing and doing either Control-k, or selecting Tools > C++ > Browse Body.
- 11. . Make the file editable.
- 12. . Towards the end of the file, in the body of get_the_ip_number, after the line //## begin routing::get_the_ip_number%<some number>.body preserve=yes, add the lines:
ip ip_class; return (ip_class.get_unique_number());
The function get_unique_number() is created by default when Rose generates the code from the model. Since we defined unique_number as an int, the get function returns an int.
This establishes the semantic dependency of routing on the return type of ip's get_unique_number().
- 13. . Save the code and exit the editor.
- 14. . In Rose, select the package IP, and code (Tools > Apex > Compile > Code).
- 15. . Click OK on the Apex Code dialog window.
Note: As you would expect, all 4 files are compiled (warnings on the files are expected and okay, but check for errors, there should be none). You may wish to enlarge the Apex Message window to see all the compilation messages at one time. You can also see all four compiles in the Apex code message window.
- 16. . Close the Apex Code message window.
Fast-Path Recompilation: Avoiding Recompilation
- 1. . In Rose, bring up the class specification for the class ip by either double clicking on the class icon, or right-mouse click and select Open Specification.
- 2. . Select the Attributes tab.
- 3. . Bring up the Attributes Specification window by double clicking on unique_number.
- 4. . Change the return type ("Type") to "float" (from int). This will change the return type of the automatically generated get function get_unique_number().
- 5. . Close the Class Attributes Specification window.
- 6. . Close the Class Specification window.
- 7. . Re-generate code for the class ip (select ip, and either enter Control-g or select the Tools > C++ > Code Generation menu item).
- 8. . Close the Rose Code Generation Status window.
- 9. . Compile for the IP package (select the package icon, IP, and then select the Tools > Apex > Compile > Code menu item).
- 10. . Close the Apex Code Message window.
Although a change has been made to the class ip, which is included by 3 other files (routing, unique, and ip2phy), only the one class that is affected by the change gets re-compiled, the class ip also gets recompiled. Depending upon the order of the compiles, one of the other classes (unique or ip2phy) may also recompile before the other two files. Apex realizes that the ip.h file must be recompiled in context. If it compiles it in routing first, then it will have the semantic information necessary to not recompile unique and ip2phy. If the order of compilations has either unique or ip2phy compile first, then Apex won't have that semantic information until after it has completed the compilation of that file.
The 2 classes, unique and ip2phy are "recompiled by inspection" (note message in Apex Message window). This means that Apex, from a semantic understanding of the relationship between these two classes and the class ip, and with an understanding of the changes to the class ip, realizes that it is unnecessary to actually recompile these files.
The class routing gets recompiled because of it's semantic dependency upon the return type of get_unique_number(). If routing were not recompiled, it would be expecting an integer back but would be receiving a float.
Tutorial 5: Multiple Users & Team Development - Overview
- Features shown
- How a model migrates from one view to the next
- How multiple users may use a model
- Benefits
- Teams can develop models just like code (branch and merge, or private check out, while possible is not advised)
- Scales for large applications
- We will create a new "view" (called "intg") of our application
Multiple Users & Team Development: Partition the model into controlled units
We will partition the model into units, each unit will be separately controlled
- 1. . Make each package a controlled unit:
- a. . Select Browse > Units from the menu bar.
- b. . Make sure that Logical View is selected in the Group box.
- c. . Select Top_Level in the Packages: box.
- d. . Click the Control button.
- e. . Save the file into your view of the top level subsystem (<tutorial_directory/Top_Level.ss/<userID>.wrk/Top_Level.cat).
- f. . Select E-Mail in the Packages: box.
- g. . Click the Control... button.
- h. . Save the file into your view of the E-Mail subsystem
(<tutorial_directory>/E-Mail.ss/<userID>.wrk/E-Mail.cat).- i. . Repeat for TCP_UDP and IP packages.
Each package can now be separately checked in and out, allowing different designers to work on different parts of the model in parallel.
- 2. . Close the Rose Units window.
- 3. . Now save the model. Answer "Yes" to "Save subunits of Model?".
- 4. . Bring up the Apex Editor on the class getmsg header file. (Recall that it's in the E-mail package. Select getmsg, and then Tools > C++ > Browse Header.) Make note of the path name (from the title bar of the Editor window), in particular, note the working view that the file is in. In a minute, we will automatically update that so that the same actions bring up a file in our new view.
- 5. . Close the Editor window.
Multiple Users & Team Development: Check-in all files
Before moving files to a new view, you should always make sure everything is checked into the Configuration Management system.
- 1. . Click the Redisplay button in the Apex directory viewer.
- 2. . In the Apex Directory window, expand the view until you can see all the .cc, .h, .cat and .mdl files.
- 3. . Select all of these files (holding the control key while using the mouse to select the files will let you select multiple files).
- 4. . Select Control > Check In....
- 5. . In the Apex Check In window, make sure the Place files under source control (if necessary) button is checked.
- 6. . Click OK.
Note: It's important that all the files be version controlled and checked in. The apex version control propagation commands apply to version controlled files.
Multiple Users & Team Development: Create the name for the integration view
- 1. . Navigate to the Class Diagram > Logical View/Main window in Rose.
- 2. . Deselect everything by clicking on the white background of the diagram.
- 3. . Select Tools > Model Properties > Edit. or press the F4 button.
- 4. . Select the Apex tab.
- 5. . Change the Type pull down to Project.
- 6. . Double click on the ApexView property value and give it the value of "intg.wrk" (the name of the integration view).
- 7. . Commit the change by clicking elsewhere on the dialog box.
- 8. . Click OK to commit the change.
Note: We have just set the model to ALWAYS point at intg. In general this is WRONG, but for this case it serves the useful purpose of allowing us to create new views. We MUST return the model to the general state when we're done.
Multiple Users & Team Development: Create the new integration view
- 1. . While in the Class Diagram > Logical View/Main window within Rose, type Control-A, this selects all 4 packages.
- 2. . Select Tools > C++ > Code Generation.
- 3. . Rose will ask to create 4 new views (one for each subsystem), click Yes on the dialog box.
- 4. . Click OK on the 4 dialog boxes to create the new views.
- 5. . Watch the views get created in the message window.
- 6. . Click the Cancel button on the Apex Check Out window (we will be updating this view with the code from our working view).
- 7. . Click Close on the Rose success dialog box.
Multiple Users & Team Development: Restore the model
Note: When you are done, make sure that you generalize your model again by performing the following procedure.
- 1. . From the Apex directory viewer, select tutorial1.mdl (found in <tutorial_directory>/Top_Level.ss/<userID>/tutorial1.mdl), and then check it out by selecting Control > Check Out.....
- 2. . Navigate to the Class Diagram > Logical View/Main window in Rose.
- 3. . Deselect everything by clicking on the white background of the diagram.
- 4. . Select Tools > Model Properties > Edit, or press the F4 button.
- 5. . Select the Apex tab.
- 6. . Change the Type pull down to Project.
- 7. . Double click on the ApexView property value and set it back to blank.
- 8. . Commit the change by clicking elsewhere on the dialog box.
- 9. . Click OK to commit the change.
- 10. . Save the model, don't save the sub-units.
- 11. . Check the model in from Rose by selecting Browse > Units, click the Others button, and double click the check In... entry in the lower right corner of the box.
Multiple Users & Team Development: Update the new integration view
- 1. . In the Apex Directory window, select the <userID>.wrk working view (in the E-Mail.ss subsystem).
- 2. . Select Control > Update Objects.
- 3. . Do the following in the Apex Update Objects window:
- a. . In the Objects area, located in the upper left hand corner of the window, click on the Source button.
- b. . In the Mode area, found below the Objects area, click on the Make objects identical to source objects button.
- c. . In the Views area, found below the Mode area, type intg.wrk at the end of the path in the Add box, and then click on OK. The new path to add should look like:
To update all views perform the following procedure.
- 1. . From the Apex Directory window, select the <userID>.wrk working view under the E-Mail.ss subsystem.
- 2. . Select Control > Update Objects.
- 3. . Do the following in the Apex Update Objects window:
- a. . In the Objects area, click on the Source button.
- b. . In the Add box in the Objects area, replace E-Mail.ss with *. The new path will look like similar to
- c. . In the Mode area, select the Make objects identical to the source objects button.
- d. . In the Views area, click on the Use a subsystems-relative view name button, and enter intg.wrk in the box.
- e. . Click OK.
Multiple Users & Team Development: Note automatically maintained links
- 1. . From the directory viewer, double click Top_Level.ss/intg.wrk/tutorial1.mdl. This will open the newly created model in Rose from the intg view.
- 2. . Bring up the Apex Editor on the class getmsg header file (from Rose select getmsg and then Tools > C++ > Browse Header, note the new path name displayed in the title bar of the Editor window.
- 3. . From the Class Diagram > Logical View/Main window within Rose, select the E-Mail package and then Browse > Browse Header.
The Apex Directory window is brought up pointing to the integration view. This means that as your project evolves, the model will point to the "right" place.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |