Synchronizing an OOM with Its Java Source

You can synchronize an Object Oriented Model (OOM) with its Java source code, so that each time you modify the model, a source code file is automatically created or updated, and when you modify and save a source code file, the changes appear in the model. Synchronization is only available for Java OOMs.

You can activate synchronization from the Model Explorer or Navigator. A model is synchronized per package.

Note: You can only synchronize each package with one set of source files and each set of source files with one package. If you try to synchronize a second model with a package, its check box is unavailable.
  1. In the Model Explorer, right-click the model and select Synchronize, then select the Synchronized check box:


    Note: You can, alternatively, enable synchronization from the Navigator by right-clicking the model, selecting Properties, selecting PowerDesigner in the left pane and the Synchronized check box in the PowerDesigner page.
  2. Select the packages you want to synchronize with their source code. The default package regroups all the objects at the root of the model.
  3. Click Finish.

    In the Navigator, the model bears a synchronized label, each synchronized package bears a synchronized symbol overlay, and a Java file (.java) and compiled file (.class) appear for each synchronized object:



    You can double-click a Java or compiled file, to display its source code in the Editor view.