Chapter 14 Working with the PowerDesigner Plugin for Eclipse


Synchronization example

The following example is developed from the synchronized OOM, demo.oom

Steps To create and delete an attribute in a synchronized model:

  1. Double-click the printer symbol, select the Attributes tab, and add a usbPort attribute with a boolean data type and a public visibility.
  2. Click OK to return to the class diagram, where the usbPort attribute is displayed in the printer symbol:
  3. Right-click the printer symbol or the printer item in the Model Explorer and select Edit Source Code to open the source code file of the printer class in a pane directly under the diagram:


    Note that the usbPort attribute is displayed in the synchronized source code.
  4. Delete the code concerning the usbPort attribute.
  5. Select File→Save in the Eclipse menu bar.

    The usbPort attribute disappears from the printer symbol because the printer class in the OOM has been synchronized with its source code.

Refresh source code

If you change generation templates, you can regenerate source code manually with the Refresh Source Code feature:

 


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