Chapter 10 Reverse Engineering in an OOM


Synchronizing a model with generated files

You can use an accelerated process in class diagrams to modify or add classes by accessing generated files. If you generate code, you can use your code editor to visualize and change the generated file. This feature allows you to design in PowerDesigner, use the generation process, then visualize and modify the generated file in the code editor, synchronize the classifiers with the source code and then go back to the model. With this feature, you can modify the generated file and reverse in the same generated file.


The synchronization launches a reverse engineering dialog box, pre-selects option, and fills the list of classifiers with the classifiers selected in the class diagram.

You can then easily locate the files that should be taken into account for synchronization. If there is no classifier selected, the reverse feature pre-selects directories and adds the current directory to the list.

Steps To synchronize a model with generated files:

  1. Select Language→Synchronize with generated files to display the Reverse dialog box.

    The Selection page appears.
  2. Select to reverse engineer files or directories from the Reverse Engineering dropdown listbox.
  3. Click the Add button.

    The Browse for Folder dialog box appears.
  4. Select the directory you need.
  5. Click OK.

    The Reverse Java dialog box displays your selection.
  6. Click OK.

    A progress box appears, followed by the Merge Models dialog box.

    Note   Merging models
    The Merge Models dialog box shows the From Model (source directory) in the left pane, and the To Model (current model) in the right pane. You can expand the nodes in the To Model pane to verify that the merge actions selected correspond to what you want to perform.

  7. Click OK.

    The Reverse page of the Output window displays the changes which occurred during synchronization and the diagram window displays the synchronized model.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.