This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.
Rose Reverse Engineering HOWTO
|
Author:
Max Sang
Date:
1 Mar 2002
1. Start Rose
As root,
- soft link /pttools/Rose to /afs/cern.ch/pttools/Rose
- soft link /pttools/FlexLm to /afs/cern.ch/pttools/FlexLm
See here for more details.
For some reason, you have to set the X permissions to allow access from everyone logged
onto your machine, e.g. xhost +pcitasd23 (insert your machine name).
Next, do source /pttools/Rose/linux/rose/rose.csh and then just type rose.
It takes some time to start up. It uses a private colour map so prepare for the occasional
psychedelic experience.
2. Reverse Engineer the Package
- Right-click on Component View in the left hand window and then Add Component
- Change the name of the component, to e.g. FML
- Right-click on the FML component and select Open Specification...
- Change Language to Ansi C++ and click OK
- Right click (again) on the FML component, select Ansi C++... and then
Open C++ Specification...
- Change the Reverse Engineering Root Package field to something meaningful, then enter
the source directory you want to reverse engineer. Warning! You may browse but never
click on /afs - the stupid program will try to read the whole afs tree (which means
you have to kill it and start again!)
- Click on Add Files. A little text box opens up, with a [...] at the right hand side.
Click this and you get a file browser. Hold down Ctrl, click on all the source files
(.h and .cpp!) and then click OK
- Right-click on FML (yet again!) and select Ansi C++ and then Reverse Engineer...
3. Create the diagram
- Expand the Logical View menu tree (i.e. click on the [+]) and you should see
a folder with your component name. Expand the tree until you find your classes.
- Select the Browse Class Diagram icon on the toolbar (wait for the tooltip to appear
if you don't know which it is (RTFM!)) and open a new diagram with a reasonable name. The
new window should open in the workspace.
- Drag the classes from the tree and drop them into the window (not all at once! read the advice below!)
4. Tweaking the class diagram
- Work on one class at a time - only move to the next class when you're happy with the current one. Things can get
very cluttered if you have 10 classes with all their attributes and methods showing.
- Right click on the class you want to edit and select Options...
- Turn off Show all Attributes and Show all Operations. The class should shrink to a little box.
- Select Select Compartment Items. Holding down Ctrl, you can select which data and methods you
want to show. When you're done, click on the [>>>] button to transfer them over to the "visible" box.
- Edit the methods/attributes as required and resize the box to show them all.