eclipse plugin userguide

297
Working with the Eclipse Plugin Sybase ® PowerDesigner ® 12.5 Windows

Upload: khuc-vu

Post on 18-Nov-2014

1.570 views

Category:

Documents


16 download

DESCRIPTION

`12`12

TRANSCRIPT

Page 1: Eclipse plugin userguide

Working with the Eclipse Plugin

Sybase® PowerDesigner®

12.5Windows

Page 2: Eclipse plugin userguide

Part number: DC00027-01-1250-01Last modified: April 2007

Copyright © 1991-2007 Sybase, Inc. and its subsidiaries. All rights reserved.

Information in this manual may change without notice and does not represent a commitment on the part of Sybase, Inc. and its subsidiaries.

Sybase, Inc. provides the software described in this manual under a Sybase License Agreement. The software may be used only in accordance withthe terms of the agreement.

No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, orotherwise, without the prior written permission of Sybase, Inc. and its subsidiaries.

Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 for theDOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies.

Sybase, SYBASE (logo), ADA Workbench, Adaptable Windowing Environment, Adaptive Component Architecture, Adaptive Server, AdaptiveServer Anywhere, Adaptive Server Enterprise, Adaptive Server Enterprise Monitor, Adaptive Server Enterprise Replication, Adaptive ServerEverywhere, Advantage Database Server, Afaria, Answers Anywhere, AppModeler, APT Workbench, APT-Build, APT-Edit, APT-Execute,APT-Translator, APT-Library, ASEP, Avaki, Avaki (Arrow Design), Avaki Data Grid, AvantGo, Backup Server, BayCam, Bit-Wise, BizTracker,Certified PowerBuilder Developer, Certified SYBASE Professional, Certified SYBASE Professional Logo, ClearConnect, Client-Library, ClientServices, CodeBank, Column Design, ComponentPack, Connection Manager, Convoy/DM, Copernicus, CSP, Data Pipeline, Data Workbench,DataArchitect, Database Analyzer, DataExpress, DataServer, DataWindow, DataWindow .NET, DB-Library, dbQueue, Dejima, Dejima Direct,Developers Workbench, DirectConnect Anywhere, DirectConnect, Distribution Director, Dynamic Mobility Model, e-ADK, E-Anywhere, e-BizIntegrator, E-Whatever, EC Gateway, ECMAP, ECRTP, eFulfillment Accelerator, EII Plus, Electronic Case Management, Embedded SQL, EMS,Enterprise Application Studio, Enterprise Client/Server, Enterprise Connect, Enterprise Data Studio, Enterprise Manager, Enterprise Portal (logo),Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise Work Designer, Enterprise Work Modeler, eProcurement Accelerator,eremote, Everything Works Better When Everything Works Together, EWA, ExtendedAssist, Extended Systems, ExtendedView, Financial Fusion,Financial Fusion (and design), Financial Fusion Server, Formula One, Fusion Powered e-Finance, Fusion Powered Financial Destinations, FusionPowered STP, Gateway Manager, GeoPoint, GlobalFIX, iAnywhere, iAnywhere Solutions, ImpactNow, Industry Warehouse Studio, InfoMaker,Information Anywhere, Information Everywhere, InformationConnect, InphoMatch, InstaHelp, Intelligent Self-Care, InternetBuilder, iremote,iScript, Jaguar CTS, jConnect for JDBC, KnowledgeBase, Logical Memory Manager, lrLite, M2M Anywhere, Mach Desktop, Mail AnywhereStudio, Mainframe Connect, Maintenance Express, Manage Anywhere Studio, MAP, M-Business Anywhere, M-Business Channel, M-BusinessNetwork, M-Business Suite, MDI Access Server, MDI Database Gateway, media.splash, Message Anywhere Server, MetaWorks, MethodSet,mFolio, Mirror Activator, ML Query, MobiCATS, Mobil 365, Mobileway, MySupport, Net-Gateway, Net-Library, New Era of Networks, NextGeneration Learning, Next Generation Learning Studio, O DEVICE, OASiS, OASiS logo, ObjectConnect, ObjectCycle, OmniConnect, OmniQ,OmniSQL Access Module, OmniSQL Toolkit, OneBridge, Open Biz, Open Business Interchange, Open Client, Open ClientConnect, OpenClient/Server, Open Client/Server Interfaces, Open Gateway, Open Server, Open ServerConnect, Open Solutions, Optima++, Partnerships thatWork, PB-Gen, PC APT Execute, PC DB-Net, PC Net Library, Pharma Anywhere, PhysicalArchitect, Pocket PowerBuilder, PocketBuilder,Power++, Power Through Knowledge, power.stop, PowerAMC, PowerBuilder, PowerBuilder Foundation Class Library, PowerDesigner,PowerDimensions, PowerDynamo, Powering the New Economy, PowerScript, PowerSite, PowerSocket, Powersoft, PowerStage, PowerStudio,PowerTips, Powersoft Portfolio, Powersoft Professional, PowerWare Desktop, PowerWare Enterprise, ProcessAnalyst, Pylon, Pylon Anywhere,Pylon Application Server, Pylon Conduit, Pylon PIM Server, Pylon Pro, QAnywhere, Rapport, Relational Beans, RepConnector, Report Workbench,Report-Execute, Replication Agent, Replication Driver, Replication Server, Replication Server Manager, Replication Toolkit, Resource Manager,RFID Anywhere, RW-DisplayLib, RW-Library, SAFE, SAFE/PRO, Sales Anywhere, Search Anywhere, SDF, Search Anywhere, Secure SQLServer, Secure SQL Toolset, Security Guardian, ShareSpool, Sharelink SKILS, smart.partners, smart.parts, smart.script, SOA AnywhereTrademark,SQL Advantage, SQL Anywhere, SQL Anywhere Studio, SQL Code Checker, SQL Debug, SQL Edit, SQL Edit/TPU, SQLEverywhere, SQL Modeler, SQL Remote, SQL Server, SQL Server Manager, SQL SMART, SQL Toolset, SQL Server/CFT, SQL Server/DBM,SQL Server SNMP SubAgent, SQL Station, SQLJ, Stage III Engineering, Startup.Com, STEP, SupportNow, S.W.I.F.T. Message Format Libraries,Sybase 365, Sybase Central, Sybase Client/Server Interfaces, Sybase Development Framework, Sybase Financial Server, Sybase Gateways, SybaseIQ, Sybase Learning Connection, Sybase MPP, SyberLearning LIVE, Sybase SQL Desktop, Sybase SQL Lifecycle, Sybase SQL Workgroup,Sybase Synergy Program, Sybase Virtual Server Architecture, Sybase User Workbench, SybaseWare, Syber Financial, SyberAssist, SybFlex,SybMD, SyBooks, System 10, System 11, System XI (logo), SystemTools, Tabular Data Stream, The Enterprise Client/Server Company, TheExtensible Software Platform, The Future Is Wide Open, The Learning Connection, The Model For Client/Server Solutions, The Online InformationCenter, The Power of One, TotalFix, TradeForce, Transact-SQL, Translation Toolkit, Turning Imagination Into Reality, UltraLite, UltraLite.NET,UNIBOM, Unilib, Uninull, Unisep, Unistring, URK Runtime Kit for UniCode, Unwired Accelerator, Unwired Orchestrator,Viafone, Viewer,VisualWriter, VQL, WarehouseArchitect, Warehouse Control Center, Warehouse Studio, Warehouse WORKS, Watcom, Watcom SQL, WatcomSQL Server, Web Deployment Kit, Web.PB, Web.SQL, WebSights, WebViewer, WorkGroup SQL Server, XA-Library, XA-Server, XcelleNet, XPServer, XTNDConnect, and XTNDACCESS are trademarks of Sybase, Inc. or its subsidiaries.

All other trademarks are the property of their respective owners.

ii

Page 3: Eclipse plugin userguide

Contents

About This Manual v

1 Getting Started with the PowerDesigner Eclipse Plugin 1The PowerDesigner Interface . . . . . . . . . . . . . . . . . . 2Working with the Model Explorer . . . . . . . . . . . . . . . . 8Creating a Model . . . . . . . . . . . . . . . . . . . . . . . . . 10Working with Objects . . . . . . . . . . . . . . . . . . . . . . . 13Working with Packages . . . . . . . . . . . . . . . . . . . . . 21Connecting to a Database . . . . . . . . . . . . . . . . . . . . 22Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

2 Using the PowerDesigner Interface 35Managing Objects in the Model Explorer . . . . . . . . . . . . 36Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Property Sheets . . . . . . . . . . . . . . . . . . . . . . . . . 41Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Setting PowerDesigner General Options . . . . . . . . . . . . 67

3 Managing PowerDesigner Licenses 79Understanding License Management in PowerDesigner . . . 80Requesting a License from Sybase Product Download Center 86Using the License Management Wizard . . . . . . . . . . . . 87

4 Managing Models 95Working with Model Files . . . . . . . . . . . . . . . . . . . . 96Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Checking a Model . . . . . . . . . . . . . . . . . . . . . . . . 124Using the Free Model . . . . . . . . . . . . . . . . . . . . . . 129Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . 130Spell Checking . . . . . . . . . . . . . . . . . . . . . . . . . . 147Applying Model Transformations . . . . . . . . . . . . . . . . 149Resource Files . . . . . . . . . . . . . . . . . . . . . . . . . . 153Interchanging Models using the XMI Format . . . . . . . . . . 156Upgrading from Previous Versions of PowerDesigner . . . . . 158

iii

Page 4: Eclipse plugin userguide

5 Managing Objects 161Defining Objects . . . . . . . . . . . . . . . . . . . . . . . . . 162Business Rules . . . . . . . . . . . . . . . . . . . . . . . . . . 178Defining Extended Objects and Links . . . . . . . . . . . . . 183Dragging, Dropping, Copying, Pasting, Moving, and Deleting

Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 186Creating a Graphical Synonym for an Object . . . . . . . . . 198Finding Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 201Customizing the Generation of Files for an Object . . . . . . 207Using File Objects . . . . . . . . . . . . . . . . . . . . . . . . 215Working with Extended Model Definitions . . . . . . . . . . . 219

6 Working with Eclipse 227Special Features . . . . . . . . . . . . . . . . . . . . . . . . . 228Generating an Eclipse Project . . . . . . . . . . . . . . . . . . 243Building and Deploying the Application Using Eclipse . . . . . 253

Index 271

iv

Page 5: Eclipse plugin userguide

About This Manual

Subject

This book describes the PowerDesigner Eclipse Plugin environment. Itshows you how to do the following:

♦ Get started with the PowerDesigner Eclipse Plugin

♦ Use the PowerDesigner interface on the Eclipse Platform

♦ Manage models in the Eclipse Platform

♦ Manage objects in the Eclipse Platform

Audience

This book is for anyone who wants to use PowerDesigner on the EclipsePlatform. It requires an understanding of the PowerDesigner modelingenvironment. Some experience with the different models of PowerDesignermight also be helpful but not required. For more information, see theBibliography section at the end of this chapter.

Documentation primer

The PowerDesigner modeling environment supports several types of models:

♦ Conceptual Data Model (CDM) to model the overall logical structure ofa data application, independent from any software or data storagestructure considerations

♦ Physical Data Model (PDM) to model the overall physical structure of adatabase, taking into account DBMS software or data storage structureconsiderations

♦ Object Oriented Model (OOM) to model a software system using anobject-oriented approach for Java or other object languages

♦ Business Process Model (BPM) to model the means by which one ormore processes are accomplished in operating business practices

♦ XML Model (XSM) to model the structure of an XML file using a DTDor an XML schema

♦ Requirements Model (RQM) to list and document the customer needsthat must be satisfied during a development process

v

Page 6: Eclipse plugin userguide

♦ Information Liquidity Model (ILM) to model the replication ofinformation from a source database to one or several remote databasesusing replication engines

♦ Free Model (FEM) to create any kind of chart diagram, in a context-freeenvironment

This book only explains how to use the PowerDesigner Eclipse Plugin. Forinformation on the different models or aspects of PowerDesigner, consult thefollowing books:

General Features Guide To get familiar with the PowerDesigner interfacebefore learning how to use any of the models.

Conceptual Data Model User’s Guide To work with the CDM.

Physical Data Model User’s Guide To work with the PDM.

Object Oriented Model User’s Guide To work with the OOM.

Business Process Model User’s Guide To work with the BPM.

XML Model User’s Guide To work with the XSM.

Requirements Model User’s Guide To work with the RQM.

Information Liquidity Model User’s Guide To work with the ILM.

Reports User’s Guide To create reports for any or all models.

Repository User’s Guide To work in a multi-user environment using acentral repository.

Typographic conventions

PowerDesigner documentation uses specific typefaces to help you readilyidentify specific items:

♦ monospace text (normal and bold)

Used for: Code samples, commands, compiled functions and files,references to variables.

Example: declare user_defined..., the BeforeInsertTriggertemplate.

♦ bold textAny new term.

Example: A shortcut has a target object.

♦ SMALL CAPS

Any key name.

vi

Page 7: Eclipse plugin userguide

Example: Press the ENTER key.

Bibliography

Eclipse Website – http://www.eclipse.org

Eclipse online documentation – http://help.eclipse.org/help21/index.jsp

vii

Page 8: Eclipse plugin userguide

viii

Page 9: Eclipse plugin userguide

CHAPTER 1

Getting Started with the PowerDesignerEclipse Plugin

About this chapter This chapter explains the major PowerDesigner concepts, and introducesyou to the tools you will use to build your models.

Contents Topic: page

The PowerDesigner Interface 2

Working with the Model Explorer 8

Creating a Model 10

Working with Objects 13

Working with Packages 21

Connecting to a Database 22

Next Steps 33

1

Page 10: Eclipse plugin userguide

The PowerDesigner Interface

The PowerDesigner InterfaceThis section describes the main components of the PowerDesigner interface.

When you launch the Eclipse Platform for the first time, it opens theworkbench window which initially displays the Resource perspective. Aperspective defines the initial set and layout of views in the workbenchwindow.

The Resource perspective contains different views:

♦ The Navigator view displays a tree view of the projects and theirresources

♦ The Editor area displays the content of the projects and resources

♦ The Outline view displays a content outline of the file being edited.(Except for a plain text file)

♦ The Tasks view lists and marks all the tasks and problems to be solved

Click the title bar of a view to make it active. (The title bar turns blue). Thename of the active perspective is shown in the title bar of the window and itsicon is pushed-in in the shortcut bar.

We recommend you use the PowerDesigner perspective.

Activating the PowerDesigner perspective

To work with your PowerDesigner tool, you should activate thePowerDesigner perspective.

2

Page 11: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

v To activate the PowerDesigner perspective

1. Click the Open a Perspective icon in the shortcut bar and select Other.

or

Select Window ä Open Perspective ä Other.

The Select Perspective dialog box is displayed.

2. Select PowerDesigner in the list of perspectives.

3. Click OK.

The workbench window displays the PowerDesigner perspective.

Using the shortcut barOnce you have activated the PowerDesigner perspective, a PowerDesignericon is displayed in the shortcut bar and you just have to click it each timeyou need to activate the PowerDesigner perspective

Activating toolbars

Specific toolbars are set by default in the PowerDesigner perspective. If forsome reason, they do not appear in the toolbar section, you can activate themmanually.

3

Page 12: Eclipse plugin userguide

The PowerDesigner Interface

v To activate the PowerDesigner toolbars and shortcuts

1. Select Window ä Customize Perspective.

or

Right-click the toolbar section and select Customize Perspective in thecontextual menu.

The Customize Perspective dialog box is displayed.

2. In the Shortcuts tab, select New in the Submenus list, and PowerDesignerin the Shortcut Categories tree view. The Model icon is automaticallyselected in the Shortcuts list.

3. In the Shortcuts tab, select Open Perspective in the Submenus list, andPowerDesigner in the Shortcuts list.

4. In the Shortcuts tab, select Show View in the Submenus list, and Sybasein the Shortcut Categories tree view. The Model Explorer, ModelingOutput and Modeling Result List icons are automatically selected in theShortcuts list.

5. In the Commands tab, select WorkSpace Modeling Diagram, WorkSpaceModeling Standard and WorkSpace Modeling View.

6. Click OK.

The PowerDesigner toolbars appear next to the Eclipse toolbars. Thesetoolbars are common to all PowerDesigner modules. The modulesspecific diagram toolbars and toolbars will appear automatically whenyou open or create a specific model.

Using the Window menu

The Window menu supports all the features concerning perspectives:

4

Page 13: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Feature Description

Open Perspective Opens a perspective

Show View Displays a view among the following: Bookmarks,Model Explorer, Navigator, Outline, Output,Properties, Modeling Result List, Tasks, Other

Customize Perspective Opens a dialog box where you select items to bedisplayed in the current perspective

Save Perspective As Saves the current perspective with a predefined oruser-defined name, for future use

Reset Perspective Resets the current perspective to its default param-eters

Close Perspective Closes the current perspective

Close All Perspectives Closes all perspectives open in the workbenchwindow

Main window components

The main PowerDesigner window contains the following components.

Model Explorer The Model Explorer pane allows you to manage the objects you use toperform a modeling task. It displays your models and the objects belongingto them in a tree view, and allows you to rapidly navigate between them.The Model Explorer also has a tab that gives you access to a PowerDesignerrepository, where you can store all your models and associated files.

Navigator The Navigator view displays a tree view of all the resource files attached toEclipse projects open in the workbench window. These resource files can bemodel files, diagram files, source code files, specification files, or any type offile. You can use the Navigator to open models, create new projects andmodels, or even open object property sheets.

Editor area The editor area is the primary pane that displays your present modeldiagram or report outline.

Modeling Output The Modeling Output shows the progress of any PowerDesigner process,such as checking a model or generating or reverse engineering a database.

Modeling Result List The Modeling Result List displays the results of a search or a model check.

Property sheets

Each model object has a property sheet, which permits you to view and edit

5

Page 14: Eclipse plugin userguide

The PowerDesigner Interface

any of its properties. You can access an object’s property sheet bydouble-clicking its symbol in your diagram or right-clicking it and selectingProperties from the contextual menu. For more information, see the section““Working with property sheets” on page 14”.

Object lists

You can view, add, create, modify, and delete multiple objects of a particulartype by opening an object list. All your model’s object lists are accessiblevia the Model menu. For more information, see the section ““Working withobject lists” on page 17”.

6

Page 15: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

7

Page 16: Eclipse plugin userguide

Working with the Model Explorer

Working with the Model ExplorerThe Model Explorer provides a hierarchical view of all your model objects.

Hot keys for expanding and collapsing all nodes at onceTo expand all nodes at once, press the numpad plus sign (+). To collapseall nodes at once, press the numpad minus sign (-).

Model Explorer objects

A typical hierarchy of objects in a PowerDesigner Model Explorer tree is asfollows:

Folders Projects can contain user-defined folders, which allow you to organizemodels or other files into groups. For example, if you are working on twoseparate projects, you could organize the files using folders. For moreinformation about folders, see the “Using the PowerDesigner Interface”chapter.

Models A model is the basic design unit in PowerDesigner. Each model has one ormore graphical views called diagrams and any number of model objects.

Packages When you are working with large models, you may want to split them intosmaller “sub-models” in order to avoid manipulating large sets of items.These sub-models are called packages, and can be used to assign differenttasks or subject areas to different development teams. For more information,see the section ““Working with Packages” on page 21”.

Diagrams Diagrams show the interaction of various model objects. You can createseveral diagrams in a model or in a package.

Model Objects Model objects is a general term used for all items belonging to a model.

8

Page 17: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Some model objects, such as a class in an Object-Oriented Model, havegraphical symbols while others, such as business rules, do not appear indiagrams and can only be accessed from the Model Explorer or from anobject list. For more information, see the section ““Working with Objects”on page 13”.

Reports You can document your PowerDesigner models by creatingautomatically-generated single or multi-model reports in the Report Editor.

Model Explorer actions

Dragging and Dropping You can drag and drop or copy objects in the Model Explorer, or from theModel Explorer to the diagram window.

Searching You can find the Model Explorer entry for any object you see in a diagramby right-clicking the symbol and selecting Edit ä Find in the ModelExplorer from the contextual menu. This feature is also available from theobject’s property sheet (from the dropdown menu in the bottom left corner)or from the contextual menu in a Result list.

Similarly, you can find the symbol (if one exists) for any object in the ModelExplorer by right-clicking the Model Explorer entry and selecting Find inDiagram (or Find in Document View for an RQM).

9

Page 18: Eclipse plugin userguide

Creating a Model

Creating a ModelA model is the basic work unit in PowerDesigner. Every model is containedwithin a project, and contains at least one diagram and any number of otherobjects. Though a model may be split into packages for organizationalreasons or may contain several diagrams, it remains the fundamental basisfor your modeling work.

Creating a model

v To create a model

1. Select File ä New ä Model.

The New model dialog box is displayed.

If there is no project open in the Navigator view, the Create a newproject option is selected by default and the Add to an existing projectoption is disabled. An Eclipse project will then be created for the newmodel.

or

If there are projects already open in the Navigator view, you can selectthe Add to an existing project option.

Select a project. (The new model will appear in the Navigator viewwithin the existing project)

2. If you selected an existing project, click Next.

Expand (+) the project, and if it contains folders, select the sub-folderwhere folder in which the new model will appear.

You can also create a folder or a sub-folder, to do so select the project ora folder, click the New Folder button, and type a name in the New Folderdialog box and click OK. (The new model will appear in the Navigatorview within the new folder)

3. Click Finish in the Eclipse New model dialog box.

The New dialog box is displayed.

4. Select the appropriate model for your needs by clicking on it. Note thatthe tabs on the right of the dialog box change depending on the modelcurrently selected.

5. Type a name in the Model name box. This is the name of the model. Thecode of the model, which may be used for script or code generation, isderived from this name according to the model naming conventions. Youcan modify the name and/or code at any time from the model property

10

Page 19: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

sheet by right-clicking the model entry in the Model Explorer andselecting Properties from the contextual menu.

6. Choose any appropriate options in the right hand tabs (for example, ifyou are creating a PDM, you will specify a particular DBMS to model or,for an OOM, you will specify an object language).

7. If you are creating a BPM, OOM, or PDM, you can also specify the typeof diagram you want to start with (you can add additional diagrams toyour model later by right-clicking on the model in the Model Explorerand selecting New ä Diagram_Type).

8. Click OK. The new model will be created in your project in the ModelExplorer, and its default diagram will be opened in the editor area.

The following table lists the PowerDesigner models that you see in theModel type pane:

Icon Model definition File exten-sion

Business Process Model. A BPM allows you toidentify processes and atomic tasks and organize themin a hierarchy that you can then implement

.bpm

Conceptual Data Model. A CDM represents the overalllogical structure of a database, which is independentof any software or data storage structure

.cdm

Free Model. A FEM allows you to create any kind ofchart or diagram, in a context-free environment

.fem

Information Liquidity Model. An ILM is a design toolto make replication engine design and configurationeasier to use

.ilm

Multi-Model Report. Not a model, but an automatedreport that covers more than one model

.mmr

Object Oriented Model. An OOM uses UML diagramsto let you design a static conceptual model of asoftware system using an object-oriented approach forJava or other object languages

.oom

Physical Data Model. A PDM specifies the physicalimplementation of the database

.pdm

11

Page 20: Eclipse plugin userguide

Creating a Model

Icon Model definition File exten-sion

Requirements Model. An RQM is a textual model,which can be used to list and explain all the customerneeds that must be satisfied during a developmentprocess

.rqm

XML Model. An XSM is a graphic representation ofan XML file that provides a global and schematic viewof all its elements

.xsm

Opening an existingmodel

To open an existing model you have to import it into Eclipse.

v To open an existing model

1. Select File ä Import to display the Import dialog box.

2. Select Model in the list and click Next.

3. Type a model filename in the corresponding box or click the Browsebutton to select a model from a selection dialog box.

4. Select the Create a linked resource check box if you want to associate themodel to the current project without copying the file to the projectlocation.

5. Select an existing project or create a new project where to open theexisting model and click Finish.

The model default diagram is displayed in the Editor area.

Saving a model Each model is saved in a separate file, with an extension specific to its modeltype. When you save a model, PowerDesigner also automatically creates abackup copy.

v To save and close a model

1. Select File ä Save.

or

Click the Save tool in the PowerDesigner toolbar.

or

Right-click the model in the Model Explorer and select Save.

2. Right-click the model and select Close.

12

Page 21: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Working with ObjectsModel objects are the building blocks of your models. They are listed asitems in the Model Explorer and often also appear as symbols in yourdiagrams.

There are two main types of objects:

♦ Ordinary Objects – such things as tables and entities, which areself-sufficient, and can be created in isolation from other objects

♦ Link Objects – such things as associations or dependencies, which linktwo ordinary objects, and cannot be created in isolation

Creating objects

You can create objects:

♦ Directly in your diagram, using the diagram toolbar tool (if the object canbe represented in a diagram by a symbol)

♦ From the Model Explorer

♦ From an object list

Creating an object fromthe diagram toolbar

Ordinary objects, such as classes (in an OOM), or tables (in a PDM) can becreated independently in any free space in the diagram:

v To create an ordinary object from the diagram toolbar

1. Click an object creation tool in the diagram toolbar and note how thepointer takes on the form of the selected object.

2. Click in a space in the diagram to create an object symbol there, and notethat an entry for the object is displayed in the Model Explorer.

3. Click elsewhere in the diagram to create another object symbol, orright-click anywhere to release the object creation tool and return to thepointer tool.

Link objects, such as messages (in an OOM), or references (in a PDM) aredrawn between two ordinary objects in the diagram:

13

Page 22: Eclipse plugin userguide

Working with Objects

v To create a link object from the diagram toolbar

1. Click a link object creation tool in the diagram toolbar and note how thepointer takes on the form of the selected link object.

2. Click and hold inside an ordinary object, and then drag the pointer toinside a second object. The link object is created when you release themouse button. Note that an entry for the link is displayed in the ModelExplorer.

3. Do the same again to link two other objects or right-click anywhere torelease the object creation tool and return to the pointer tool.

v To change the default name of a newly-created object

1. Click the object to select it.

2. Click it again (or press F2) to enter edit in place mode. Press ENTER afteryou have completed typing the new name.

Creating an object fromthe Model Explorer

v To create an object in the Model Explorer

1. Right-click the model, package or object category where you want tocreate the object, and select New ä object_type to open a new defaultobject property sheet (see the section ““Working with property sheets” onpage 14”).

2. Type an object name and code in the General tab of the property sheet,and then add any other relevant properties in the remaining fields of thisor the other tabs.

3. Click OK to confirm the creation of the object.

The object is created in the appropriate object category in the ModelExplorer, under the current model or package, and its symbol is added to thecurrent diagram.

Creating an object froman object list

You can also create objects from the lists of your model objects available byclicking Model ä object_type. For more information, see the section““Working with object lists” on page 17”.

Working with property sheets

All model objects created in PowerDesigner have property sheets.

14

Page 23: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Property sheets allow you to assign extensive and sophisticated properties toobjects. Most PowerDesigner objects have the following properties, but notethat many other properties will be available, depending on the type of object:

♦ Name: the name of the object, which should be clear and meaningful,and should convey the object’s purpose to non-technical users

♦ Code: the technical name of the object, which is used for generating codeor scripts, which may be abbreviated, and should not generally includespaces

♦ Comment: an optional description of the object, which can be used toprovide further information.

♦ Notes (on the Notes Tab) are made up of Descriptions, which providedetailed information about the object, and Annotations, which containyour own notes regarding the implementation of the object

♦ Rules (on the Rules tab) that your business follows. A business rulecould be a government-imposed law, a customer requirement, or aninternal guideline

♦ Version Information (on the Version Info tab) provides details about theobject owner, creation, and modification date

♦ Dependencies (on the Dependencies tab) list all objects depending on thecurrent object

15

Page 24: Eclipse plugin userguide

Working with Objects

♦ Extended Dependencies (on the Extended Dependencies tab) list allobjects which collaborate with the current object

Opening a propertysheet

v To open a property sheet

1. Double-click the object symbol in the diagram.

or

Right-click the object symbol in the diagram and select Properties.

or

Right-click the object name in the Model Explorer and select Properties.

or

Double-click any label (name, code, role or cardinality) of a linkingobject in the diagram.

The property sheet opens to the General tab. In the case of a link object, agraphical representation of the link with its source and destination objectspoints is displayed in the upper part of the dialog box.

16

Page 25: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Specifying objectproperties

Property sheets behave like standard dialog boxes, and allow you to performall the usual actions, such as typing and editing text in boxes, selecting checkboxes, and selecting values in lists.

Once you have defined or modified any properties, you can click Apply tocommit any changes and continue, or OK to commit any changes and closethe property sheet. Click Cancel if you want to discard any changes made.

Customizing a propertysheet

Since PowerDesigner property sheets can contain such a large, diverseamount of information, you may want to customize their display via theCustomize Property Sheet dropdown menu in the bottom-left corner. Thismenu gives you the following options:

Command Description

Display Standard Pages Displays a minimum number of tabs or thetabs that you have defined as standard in theCustomize Standard Pages dialog box

Display All Pages Displays all available tabs

Customize Allows you to define standard tabs

Any changes in the display options of property pages are immediatelyapplied to the current property sheet and become the default settings for anyproperty sheet of the same type that you subsequently open.

Working with object lists

Every object created in your model will appear in the object list of that typethat is available by selecting Model ä object_type, or by right-clicking yourmodel in the Model Explorer and selecting List of ä object_type from thecontextual menu.

An object list shows all objects of a certain type in the current package ormodel, including those that do not have symbols in the current diagram. Anobject list allows you to view, compare, and edit the properties of multipleobjects. You can add, create, modify, and delete objects directly in the list.You can also filter the objects in the list and control which property columnsare displayed.

Opening an object list

17

Page 26: Eclipse plugin userguide

Working with Objects

v To open a global object list

1. Select Model ä Item .

or

Right-click a model or package in the Model Explorer and select List ofä item .

The corresponding list opens:

Object List toolbar The following tools are available in the object list toolbar:

Tool Action

Show the property sheet of the selected object

Create a new object

Cut the selected object

Copy the selected object

Paste the selected object

Delete the selected object

18

Page 27: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Tool Action

Find a row

Find the symbol of the selected object in the diagram

Customize the columns to be displayed and/or filter by theircontents

Enable or disable a filter

Display objects belonging to sub-packages of the present modelor package

Display composite objects (not available in all lists)

Display objects that exist only as shortcuts in the current model

Creating a new object ina list

v To create a new object in a list

1. Select Model ä object_type (or select the appropriate tab in an object’sproperty sheet) to open the list.

2. Click the Add a Row tool to add a new default object at the end of the list.

3. Type an appropriate name for the object (and, for link objects, select asource and a destination object), and click Apply. The new object will beplaced in its appropriate alphabetical place in the list. Add other objectsif necessary.

4. Click OK to close the list and return to the diagram which will becentered upon the symbol of the last object added.

Modifying object properties

You can modify object properties:

♦ In the object’s property sheet

♦ From a list

19

Page 28: Eclipse plugin userguide

Working with Objects

Modifying properties in aproperty sheet

v To modify an object’s properties in its property sheet

1. Right-click the object in the Model Explorer and select Properties.

or

Right-click the object symbol in the diagram and select Properties.

or

Double-click the object symbol in the diagram.

2. Modify the necessary properties in the different tabs.

3. Click OK to save your changes and close the property sheet.

Opening property sheets at the last accessed tabProperty sheets open to the General tab by default. However, you canchoose to open property sheets at the last accessed tab by selecting Toolsä General Options ä Dialog, and selecting the Keep Last Tab option inthe Property Sheets groupbox.

Modifying properties in alist

v To modify object properties in a list

1. Select Model ä object_type (or select the appropriate tab in an object’sproperty sheet) to open the list.

2. Select the object that you want to modify and edit any of its propertiesdirectly in the list.

3. Click OK to save your changes and close the list.

20

Page 29: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Working with PackagesA package is a piece of a model. When working with large models, you cansplit them into smaller subdivisions in order to avoid manipulating the entiremodel at once. Packages can be useful to assign portions of a model,representing different tasks and subject areas, to different developmentteams.

Packages work like models, they can contain other packages, objects anddiagrams. You can create as many packages as you need in a model, and youcan also assign as many diagrams as you need to provide a specific view ofeach package.

Creating a package You can only create a package inside a model.

♦ From a diagram: select the diagram toolbar’s Package tool and click inthe diagram

♦ From the Model Explorer: right-click a model and select New ä Package

♦ From the list of packages: select Model ä Packages to display the List ofPackages and click the Add a row tool to insert a new package in the list

In the example below, a package called “Lending Records” (with a diagramof the same name) has been added to the model “Library OOM”:

Building a package You build a package in the same way as you build a model, with thedifference that you must decide who will own each object, the model or thepackage. Objects created in and owned by a model will be available to all itspackages as shortcuts, and vice versa. Thus only one instance of each objectneed be created in the model or in a package, and it can be referenced byway of the shortcut.

Saving a package You cannot save a package individually, but only within its parent model.

21

Page 30: Eclipse plugin userguide

Connecting to a Database

Connecting to a DatabasePowerDesigner allows you to define data connections to access informationin different database management systems (DBMSs) using Structured QueryLanguage (SQL).

A data connection processes function calls and SQL requests coming fromPowerDesigner and sends them to a data source, and returns results toPowerDesigner.

The PowerDesigner physical data model (PDM) and information liquiditymodel (ILM) allow you to define data connections for target databases inorder to generate your models and reverse engineer your data sources. ThePowerDesigner repository requires a database to store your models and otherdesign documents.

+ See the Physical Data Model and Information Liquidity Model usersguides, and Working with the Repository .

PowerDesigner supports various forms of connection, and your choice willdepend on the interface that you have already installed:

You have. . . Configure a connection of type. . .

ODBC driver ODBC machine or file data source

DBMS client Native connection profile

JDBC driver JDBC connection profile

ADO.NET driver and DBMSclient

ADO.NET connection profile

OLE DB driver and DBMS client OLE DB connection profile

DirectConnect driver DirectConnect connection profile

+ For information about connecting with an ODBC driver, see“Configuring ODBC machine and file data sources” on page 22.

+ For information about connecting with a DBMS client, or JDBC,ADO.NET, OLE DB, or DirectConnect driver, see “Configuring connectionprofiles” on page 24.

Configuring ODBC machine and file data sources

There are three types of Open Database Connectivity (ODBC) data sources:

22

Page 31: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Data source Description

Machine Data source is created on the client machine, and is availableto the user currently logged onto the system. Machine datasources are stored in the part of the registry containingsettings for the current user.

System Data source is created on the client machine, and is availableto all users regardless of whether a user is logged onto thesystem or not. System data sources are stored in the part ofthe registry containing settings for the current machine.

File Data source is stored as a file. A file data source has theextension .dsn. It can be used by different users if it is placedin the default location for file data sources. File data sourcesare usually managed by database administrators.

You define data sources using the Windows ODBC Administrator, whichyou can access directly from PowerDesigner:

v To define an ODBC data source

1. Select Database ä Configure Connections to open the Configure DataConnections window, and click the ODBC Machine Data Source orODBC File Data Sources tab.

2. Click the Add Data Source tool (see “Data connection tools” on page 30)

23

Page 32: Eclipse plugin userguide

Connecting to a Database

to open the Create New Data Source window, and select a File, User, orMachine data source as appropriate and click Next.

3. Select the appropriate driver for your DBMS and click Next and thenFinish to access a driver-specific configuration dialog:

4. Enter the appropriate parameters and then click OK to return to theConfigure Data Connections window.

5. Click OK to return to your model.

Configuring connection profiles

Before you can connect to a database through a DBMS client, or JDBC,ADO.NET, OLE DB, or DirectConnect driver, you must create anappropriate connection profile.

24

Page 33: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

v To create a connection profile

1. Select Database ä Configure Connections to open the Configure DataConnections Window, and click the Connection Profiles tab:

2. Click the Add Data Source tool (see “Data connection tools” on page 30)to open a Connection Profile Definition window:

25

Page 34: Eclipse plugin userguide

Connecting to a Database

3. Enter the properties (see “Connection profile properties” on page 26)appropriate to your method of connection.

4. Click the Test Connection button to open the Test Connection window,and click OK to test your connection.

5. Click OK to close the profile definition, and return to the Configure DataConnections window

6. Click Ok to return to your model

Connection profile properties

The following properties are available in the Connection Profile Definitionwindow:

26

Page 35: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Property Description

Connection pro-file name

Specifies the name of the connection profile.

Directory Specifies the directory in which the .dcp connectionfile will be created. By default .dcp files are stored inthe Connection Profiles directory directly beneath thePowerDesigner installation directory.

Description Optional additional description of the connection profile.

Connection type Specifies the type of connection profile. You can choosebetween:♦ Native

♦ ADO.NET

♦ OLE DB

♦ JDBC

♦ DirectConnectThe choice of connection type will affect the remainingfields to be completed.

DBMS type Specifies the DBMS to which the connection profile willconnect. The list includes only those DBMSs supportedfor the specified connection type.

Server name [Native and DirectConnect only] Specifies the name ofthe database server to connect to.

Database name [Native and DirectConnect only] Specifies the name ofthe database to connect to.

User name Specifies the username to use when connecting.

Password Specifies the password to use when connecting.

ADO.NETnamespace

[ADO.NET only] Specifies the namespace to use for theconnection.

OLE DB dataprovider

[OLE DB only] Specifies the data provider to use for theconnection.

Data source [ADO.NET and OLE DB only] Specifies the data sourceto use for the connection.

Provider-specificconnection string

[ADO.NET and OLE DB only] Specifies a connectionstring to use for the connection.

27

Page 36: Eclipse plugin userguide

Connecting to a Database

Property Description

Use integratedlogin

[ADO.NET] Specifies to use your windows login forconnecting to the database.

ADO release [ADO.NET] Specifies the release to use for the connec-tion.

JDBC driverclass

[JDBC only] Specifies the driver class to use for theconnection.

JDBC connectionURL

[JDBC only] Specifies the connection URL to use for theconnection.

JDBC driver jarfiles

[JDBC only] Specifies the driver jar file to use for theconnection.

Connection pa-rameters

Specifies advanced connection parameters. Click theparenthesis tool to the right of this field to access theConnection Parameters window (see “Connection Pa-rameters window” on page 28).

Connection Parameters window

You access this window by clicking the parenthesis tool to the right of theConnection parameters field in the Connection Profile Definition window.

v To add a connection parameter

1. Click the Add a Row tool to create a new parameter.

2. Enter a name and value pair in the two columns.

3. Click OK to return to the Connection Profile Definition window. All theparameters are listed in the read-only Connection parameters field.

Native connection profile example

In the example below, I have installed the Oracle DBMS client, and so createa Native connection to my database, “Green”, on my server “Rainbow”.

28

Page 37: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

JDBC connection profile example

In the example below, I have installed the Sybase ASE JDBC driver. Ispecify the appropriate driver class in the jar file, and assemble theconnection URL to create a JDBC connection to my database, “Green”, onmy server “Rainbow”.

29

Page 38: Eclipse plugin userguide

Connecting to a Database

Data connection tools

The following tools are available in the Configure Data Connectionswindow:

Tool Description

Properties – Opens the ODBC Setup or Connection Profile Definitiondialog for the selected profile.

Add Data Source – Creates a new connection.

Browse Data Source File [ODBC file data sources and connectionprofiles] – Opens a file browser to select a .dcp profile file.

Delete – Deletes the selected connection.

Test Connection – Tests the selected connection.

30

Page 39: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Tool Description

ODBC Administrator [ODBC machine and file data sources] –Opens the ODBC Data Sources Administrator window.

Change Connection Profiles Directory [Connection profiles] – Opensa file browser in which to search for profiles. The default directory isinstall_dir/Connection Profiles.

Refresh – Refreshes the list of connections.

Select All – Selects all the connections in the list. Connections thatare selected will be displayed in lists in the PowerDesigner interface.

Unselect All - Unselects all the connections in the list. Connectionsthat are not selected will not be displayed in lists in the PowerDe-signer interface.

Connecting to a data source

When you connect to your database, PowerDesigner can communicate withit for reverse-engineering, generation or any other form of request.

v To connect to a data source

1. Select Database ä Connect to open the Connect to a Data Sourcewindow:

31

Page 40: Eclipse plugin userguide

Connecting to a Database

2. Select one of the following radio buttons, depending on your chosenmethod for connecting to your data source:

♦ ODBC machine data source (see “Configuring ODBC machine and filedata sources” on page 22)

♦ ODBC file data source (see “Configuring ODBC machine and file datasources” on page 22) - use the tool to the right of the data source fieldto browse to a new file

♦ Connection profile (see “Configuring connection profiles” on page 24)- use the tools to the right of the data source field to browse to a newdirectory or file

You can use the Modify and Configure buttons to modify or configureyour connection.

3. Enter your user ID and password, and then click Connect. If prompted byyour data source, you may need to enter additional connectionparameters.

Connection timeYou stay connected until you disconnect or terminate the shell session.

Running SQL queries against your database

You can use the Execute SQL Query dialog to query your database. Thefollowing tools are available in the Edit/Run Script editor toolbar:

Tool Description

Open Editor Contextual menu (SHIFT + F11)

Edit With (CTRL + E). Opens the previously defined default editor(see “Defining a text editor” in the Using the PowerDesignerInterface chapter). Click the down arrow to select another editor.

Run (F5). Executes the current script

[n/a] Insert Bookmark (CTRL + F2) – inserts a blue bookmark box at thecursor position. Press CTRL + F2 to delete the bookmark.

[n/a] Go to Next Bookmark (F2)

[n/a] Go to Previous Bookmark (SHIFT + F2)

32

Page 41: Eclipse plugin userguide

Chapter 1. Getting Started with the PowerDesigner Eclipse Plugin

Next StepsNow that you are familiar with the PowerDesigner Interface, you will wantto start experimenting with a particular type of model suitable to your needs:

Requirements Model (RQM)

Now turn to the Requirements Model User’s Guide where you will learnhow to:

♦ Add, modify, promote and demote requirements in the requirementshierarchy

♦ Allocate requirements to particular team members and add traceabilitylinks to other model components

♦ Import requirements from a structured MS Word document

♦ View traceability and user allocation reports

Business Process Model (BPM)

Now turn to the Business Process Model User’s Guide where you will learnhow to:

♦ Create Process Hierarchy, Business Process, Process Service, andComposite Process diagrams

♦ Manipulate Service Description Objects

♦ Generate an executable BPM, and implement processes

Conceptual Data Model (CDM)

Now turn to the Conceptual Data Model User’s Guide where you will learnhow to:

♦ Create business rules, domains, and data items

♦ Create entities and relationships between them

♦ Generate a PDM from your CDM

Physical Data Model (PDM)

Now turn to the Physical Data Model User’s Guide where you will learnhow to:

33

Page 42: Eclipse plugin userguide

Next Steps

♦ Create tables, columns, primary keys, indexes, and references and definereferential integrity

♦ Create views, triggers, and abstract data types

♦ Reverse engineer from and generate to database scripts

♦ Work with multidimensional diagrams

Information Liquidity Model (ILM)

Now turn to the Information Liquidity Model User’s Guide where you willlearn how to:

♦ Define databases, replication processes, event scripts, and otherreplication objects

♦ Reverse engineer from and generate to the Replication Server andMobilink replication engines

XML Model (XSM)

Now turn to the XML Model User’s Guide where you will learn how to:

♦ Define elements, entities, and other components of an XML schema

♦ Reverse engineer from and generate to DTD, XSD, and XDR files

♦ Generate an XSM from a PDM or OOM

Object-Oriented Model (OOM)

Now turn to the Object-Oriented Model User’s Guide where you will learnhow to:

♦ Design class, use case, and other standard UML diagrams

♦ Generate a PDM with O/R mapping

♦ Create an EJB

♦ Deploy a component

34

Page 43: Eclipse plugin userguide

CHAPTER 2

Using the PowerDesigner Interface

About this chapter This chapter explains how to use the different PowerDesigner interfacecomponents.

Contents Topic: page

Managing Objects in the Model Explorer 36

Folders 39

Property Sheets 41

Lists 54

Setting PowerDesigner General Options 67

35

Page 44: Eclipse plugin userguide

Managing Objects in the Model Explorer

Managing Objects in the Model ExplorerThe Model Explorer is a powerful feature for navigating and managingPowerDesigner objects.

Creating an object in the Model Explorer

You can create objects in the Model Explorer. If the symbol of the newobject does not appear in the diagram you may have to select Symbol ä

Show Symbols and select the object check box in the Show Symbols dialogbox. Not all objects have symbols

v To create an object in the Model Explorer

1. Right-click the project, a model, a package or an object folder and selectNew ä object type to create the object and open its property sheet.

2. Type a name and a code for the object.

3. Click OK.

The object is displayed in the Model Explorer.

Object has a symbolYou can see if an object has a symbol in the diagram by opening the objectlist to which it belongs and customize the display of the list so the S[ymbol]column is displayed. If the check box in the S column corresponding to theobject is selected, then the object has a symbol in the diagram.

+ For more information about object creation and management, see the“Managing Objects” chapter.

+ For more information about customizing the display of a list, see the““Lists” on page 54” section.

Identifying stereotyped objects in the Model Explorer

You can easily locate in the Model Explorer stereotyped objects whosestereotype is used as a metaclass. All objects having this stereotype aregrouped together within the object type folder. This is even more visiblewhen you attach an icon to this stereotype. You must collapse the object typefolder and expand it again to refresh the display and re-order the stereotypedobjects.

+ For more information about stereotypes used as a metaclass and how toattach an icon to a stereotype, see “ Defining a stereotype” in the “ManagingProfiles” chapter in the Advanced User Documentation .

36

Page 45: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

In the following example, Process_1 and Process_3 are grouped together asthey have the same stereotype used as a metaclass; while Process_2 andProcess_5, which have the same stereotype used as a metaclass, are similarlygrouped:

Displaying object properties

You can display the property sheet of an object selected in the ModelExplorer in any of the following ways:

♦ Double-click the object in the Model Explorer

♦ Select the object in the Model Explorer and press ALT+ENTER.

♦ Right-click the object in the Model Explorer and select Properties.

Reports and DiagramsWhen you double-click a report or a diagram, you open it in the reporteditor or diagram window. To open its property sheet, use one of the othermethods.

Displaying an object contextual menu from the Model Explorer

You can display the contextual menu of an object selected in the ModelExplorer.

v To display the contextual menu of an object from the Model Ex-plorer

1. Right-click an object in the Model Explorer.

Editing an item in place

You can edit in place items in the Model Explorer but you cannot edit thefolders containing objects of the same type.

37

Page 46: Eclipse plugin userguide

Managing Objects in the Model Explorer

v To edit an item in place

1. Select an item in the Model Explorer.

2. Click again on the selected item.

or

Press F2.

Dragging and dropping items

You can drag and drop items to and from the Model Explorer.

+ For more information about the drag and drop feature, see “Draggingand dropping objects” in the “Managing Objects” chapter.

Finding objects in the Model Explorer

You can locate any model object in the Model Explorer using the Find inModel Explorer feature. For example, to find:

♦ A diagram in the Model Explorer - Right-click the diagram backgroundand select Edit ä Find in Model Explorer.

♦ An object in the Model Explorer from its symbol - Right-click thesymbol in the diagram and select Edit ä Find in Model Explorer.

♦ An object in the Model Explorer from its property sheet - Open an objectproperty sheet and select Find in Model Explorer from the dropdownmenu at the bottom-left corner.

♦ An object in the Model Explorer from the Modeling Result List -Right-click the object in the list and select Find in Model Explorer.

In each case„ the parents of the object in the Model Explorer areautomatically expanded and the found object is selected, to provide you witha hierarchical view of the contents of your project.

Note that you cannot find Repository objects in the Model Explorer as theyare not visible.

38

Page 47: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

FoldersA folder is an optional container designed to help you organize the hierarchywithin a project. You use a folder to structure the contents of the project inyour local work environment. A folder cannot contain model objects, it onlycontains other container objects like folders, models, or multi-model reports.Folders are saved in the project file.

Creating a folder

Folders are not automatically created in PowerDesigner.

You can create folders from the project or from another folder.

v To create a new folder

1. Right-click the project or the folder where you want to create a newfolder and select New ä Folder.

The new folder is created below the selected item in the tree structure.

2. Type a name in the highlighted area. Folder names must be unique in thefolder hierarchy.

Renaming a folder You modify the folder property from the Model Explorer.

v To rename a folder

1. Right-click the folder to rename and select Rename.

or

Select the folder and press F2 to edit the name in place.

Creating an item in, or adding an item to, a folder

A folder is a container for sub-folders, models and multi-model reports.

v To create a new item in a folder

1. Right-click the folder and select New ä New item.

The new item is inserted in the folder.

You can add an item to a folder by copying or moving it using the drag anddrop feature. However, you cannot paste or move an open model into afolder.

39

Page 48: Eclipse plugin userguide

Folders

Multi-selectionYou can add several items simultaneously by selecting them using theCTRL key and dragging them to the target folder. However, if you select anunauthorized item or an open model, the drag and drop will fail.

v To add an item to a folder

1. Select an item.

2. Press the CTRL key and drag the item to the folder if you want to copy theitem.

or

Press the SHIFT key and drag the item to the folder if you want to movethe item.

The new item is displayed in the folder.

Deleting a folder

When you delete a folder, you detach the models and reports it contains fromthe project, but you do not delete the models and reports themselves.

CautionDeleting a folder cannot be undone.

v To delete a folder

1. Select the folder in the tree view.

2. Right-click and select Edit ä Delete.

or

Click the Delete tool from the PowerDesigner toolbar.

or

Select Edit ä Delete from the PowerDesigner menu bar.

40

Page 49: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Property SheetsThe properties of model objects can be viewed via their property sheets.

The title bar of the property sheet identifies the object, and provides thename and code of the object.

Property sheets group properties in different tabs and you can customizetheir display. Most PowerDesigner objects share the following standard tabs,which are displayed by default the first time you open the product:

Standard tabs Description

General Contains information that identifies the object (Name,Code).

Rules Contains business rules applied to the object.

Notes Contains notes (Description and Annotation) for theobject.

Version Info Contains information about the origins of the object.

Dependencies Shows items that depend on the current object andinfluence other objects.

Extended Depen-dencies

Contains user-defined dependencies of the object.

Displaying a property sheet

v To display a property sheet

1. Double-click an object symbol in the diagram.

or

Select an object symbol and press ALT + ENTER.

or

Right-click the object symbol and select Properties.

or

Right-click an object in the Model Explorer and select Properties.

Opening property sheets at last accessed tabYou can choose to open property sheets at the last accessed tab by selectingTools ä General Options ä Dialog, and selecting the option Keep Last Tabin the Property Sheets groupbox.

41

Page 50: Eclipse plugin userguide

Property Sheets

Link objects propertysheet

You can also double-click any label (name, code, role or cardinality) of thelink object to open its property sheet.

Property sheets of link objects display a graphic representation of therelations between model objects in the upper part of the property sheetdialog box.

The graphic always shows the link together with its extremities. Some textsuch as the cardinality value and the role is also displayed. The symbols andbackground color together with the text format correspond to the defaultdisplay preferences saved in the registry.

Each time you want a modification of the display preferences to be takeninto account when you display the link object property sheet, you must clickthe Set As Default button in the Display Preferences dialog box for eachmodification.

Customizing a property sheet

Since PowerDesigner can hold a rich variety of information about your

42

Page 51: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

model objects, property sheets can become overloaded.

The More or Less button at the bottom left corner of the property sheetallows you to toggle between displaying all the available property sheet tabs,and a subset called “favorite” tabs.

You can customize your list of favorite tabs, and access various otherproperty sheet features, from the property sheet menu, which is accessiblefrom the bottom-left corner of all property sheets.

Command Description

Find in Diagram Finds the object in the diagram, found object is displayedcentered and selected.

Find in ModelExplorer

Finds the object in the Model Explorer and highlights it.

Impact Analysis Opens the Impact Analysis dialog box.

Parent Proper-ties

Opens the property sheet of the parent object.

Customize Fa-vorite Tabs

Opens a sub-menu, which allows you to define favoritetabs:♦ Help – opens this help topic

♦ Display All Tabs - Displays all available property tabsfor the current property sheet

♦ Display Favorite Tabs for All - Displays favorite tabsfor all property sheets throughout all models

♦ Display All Tabs for All - Displays all tabs for all prop-erty sheets throughout all models

Beneath the sub-menu are listed all the tabs available forthe present object. Favorite tabs have a check againstthem.

Click a tab in the list to select or remove it from thelist of favorite tabs. Note that the General tab cannot beunchecked.

When you check or uncheck a tab such as Notes, Rules,and Dependencies, which are common to many objects,you are asked to confirm the change for all other ob-jects. If you click No, only the current property sheet ismodified.

In the following example, all the tabs except Implementation are checked

43

Page 52: Eclipse plugin userguide

Property Sheets

and are displayed:

Any changes in the display of tabs are immediately applied to the currentproperty sheet but not to other property sheets that are currently open. Thechanges become the default setting for any property sheet of the same type.

Displaying tabs on one or several rowsYou can choose to display tabs on one or several rows in property sheets byselecting Tools ä General Options ä Dialog, and selecting the Tabs on onerow option or the Tabs on one several rows option in the Property sheetsgroupbox.

Inserting properties in the General tab

The General tab of a property sheet contains information that identifies the

44

Page 53: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

object: the name should be clear and understandable and the code should beshorter for generation needs. You can use up to 254 characters in the Nameand Code boxes but your current language or DBMS may be morerestrictive. The comment is used to provide additional information about theobject, there is no limitation in the Comment box, and you can type as manycharacters as needed to specify the properties of the selected object.

v To insert properties in the General tab

1. Type a name in the Name box, the Code box is automatically filled if theName to code mirroring general option is selected.

or

Type a code in the Code box if the Name to code mirroring generaloption is not selected.

You can also use the Equals button at the end of the Name or Code box.

2. Type a comment in the Comment box.

3. Click Apply to validate the new properties.

Applying a business rule to an object

A business rule is a rule that your business follows. A business rule could bea government-imposed law, a customer requirement, or an internal guideline.

Business rules complement model graphics with information that is noteasily represented graphically.

You can add business rules to the definition of the current object from itsproperty sheet.

U Column in the List of business rules

When you apply a business rule to an object, the U (Used) column besidethis business rule is automatically checked in the List of business rules toindicate that the business rule is used by at least one object in the model.The U column allows you to visualize unused business rules. You can thendelete them if necessary.

v To apply a business rule to the current object

1. Open the property sheet of an object and click the Rules tab.

2. Click the Add Rules tool.

45

Page 54: Eclipse plugin userguide

Property Sheets

3. Select one or more business rules in the selection dialog box.

4. Click OK in the selection dialog box, the rules appear in the list of rules.

5. Click OK to return to the model diagram.

Attaching a requirement to an object

You can attach one or more requirements to an object in a model using theRequirements tab in the object property sheet. This tab is displayed if youselect the Enable links to requirements model option, and can be used if atleast one Requirements model is open in the project.

+ For more information about this model option, see the user’s guide ofeach PowerDesigner model.

When you double-click a row in the Requirements tab of an object propertysheet, you open the external shortcut property sheet for the selectedrequirement. If you want to open the property sheet of the requirementtarget, click the Target Object Properties button beside the Name box. Youcan also select Tools ä General Options ä Dialog from the Menu bar andselect the Target Object option beside External Shortcut to define a defaultopen mode for shortcut property sheets.

46

Page 55: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

v To attach a requirement to an object

1. Open an object property sheet and click the Requirements tab.

2. Click the Add Objects tool in the toolbar to open a selection list ofRequirements models.

3. Select one or more requirements and click OK.

The selected requirements appear in the Requirements tab.

4. Click OK to close the property sheet.

Adding notes to an object

From the Notes tab, you can document objects using an RTF editor in theDescription and Annotation tabs.

+ For more information, see “Attaching notes to an object” in the“Managing objects” chapter.

v To add notes to an object

1. Double-click an object in the diagram to display the object property sheet.

2. Click the Notes tab, the Description sub-tab is displayed by default, youcan type a description.

3. Click the Annotation tab in the lower part of the object property sheet tochange tab and type annotations.

4. Click OK.

Displaying object dependencies

When you create an external shortcut, or when you attach a business rule toan object, a dependency link is created between models or objects.

Dependencies are used to verify the use of an object or model. They can beof two types:

♦ Internal, when the links are within a model. These dependencies aresaved in the model and appear in the Dependencies tab of an objectproperty sheet

♦ External, when the links exist between models. These dependencies arecreated during intermodel generation or external shortcut creation, theyappear in the Dependencies tab if the related model is opened in theproject. If the related model is not available, you can use the repository toretrieve external dependencies

47

Page 56: Eclipse plugin userguide

Property Sheets

+ For more information about how to retrieve external links using therepository, see “Auditing repository activities” in the “ManagingRepository Documents” chapter in the Repository User’s Guide.

PowerDesigner lists these links in the Dependency tab of the object’sproperty sheet.

Model dependenciesThe Dependencies tab of a model also lets you check the model origin(Generated From tab) and destination (Generated As tab).

v To display object dependencies

1. Open the property sheet of an object and click the Dependencies tab.

2. Click the different sub-tabs to see the depending objects or the uses of theobject throughout the open models of the project.

3. Click OK.

Using extended dependencies

You can use extended dependencies to specify additional forms ofcollaborations between PowerDesigner objects. These links are allowed

48

Page 57: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

among objects of any type of model, but are not interpreted and checked byPowerDesigner, as they are meant for documentation purposes only.

You can complement these links by creating stereotypes to specify theirmeaning. Stereotypes are used to define extended dependencies in allPowerDesigner modules, and appear in the Extended Dependencies tab ofeach non-link object property sheet. You can type them directly in theStereotype column or select a value from the list if you have previouslydefined stereotypes in an extended model definition (.XEM) applied to orembedded in the model.

+ For more information about stereotypes in an extended model definition,see “Working with Extended Model Definitions” in the “Managing Objects”chapter.

Example The following example illustrates how extended dependencies can help youdocument relations between package or model objects.

This example about generation from a CDM to two PDMs generated withdifferent DBMS shows that the file object SourceCDM.cdm has extendeddependencies with the file objects GeneratedPDM.pdm (for Sybase IQ) andGeneratedPDM2.pdm (for ASA7). These extended dependencies are definedby the <<generation>> stereotype to explain that the two PDM come fromthe same CDM.

+ For more information, see the “Using file objects” section in the“Managing Objects” chapter.

Creating an extendeddependency

The object from which you create the extended dependency is the dependentobject and the object towards which it goes is the influent object.

49

Page 58: Eclipse plugin userguide

Property Sheets

You can create an extended dependency in either of the following ways:

v To create an extended dependency using the Link/Extended De-pendency tool

1. Click the Link/Extended Dependency tool in the Palette.

2. Click inside the dependent object and while continuing to hold down themouse button, drag the cursor to the influent object where you release themouse button.

Moving extended dependenciesExtended dependencies behave like oriented links. When you move thedependent object, you also move the extended dependency attached to it.And when you move the influent object, it is replaced with a shortcut topreserve the extended dependency definition.

Note that the Link/Extended Dependency tool cannot create an extendeddependency between objects belonging to different types of models as thesecannot have symbols in the same diagram.

v To create an extended dependency from the dependent objectproperty sheet1. Open the property sheet of a non-link object, and click the Extended

Dependencies tab.

2. Click the Add Objects tool to open the Add Objects dialog box.

3. Select a model from among the models open in the project from theModel box, a package from the list, and an object from one of the sub-tabs.

4. Click OK.

The extended dependency you have created is displayed simultaneouslyin the list of extended dependencies but also in the diagram if objects atboth extremities are displayed.

5. Click the Stereotype column for the extended dependency you have justcreated and type a stereotype or select a stereotype from the list ifavailable.

6. Click OK.

Displaying object version information

PowerDesigner automatically manages version information about objects inthe model. All objects with property sheets have a Version Info tab, whichdisplays the following information:

50

Page 59: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Version Info Description

Creation User Name of the User who created the object.

Creation Date Date of creation of the object

Last ModificationUser

Name of the User who made the last modification to theobject.

Last ModificationDate

Date of the last modification of the object

Generated FromOrigin Object

Name of the origin object. Displayed when the objecthas been generated from another object. Click theOrigin Object Properties button to open the origin objectproperty sheet

This information is read-only, you cannot modify any value in this tab.

Finding text using regular expressions

A regular expression is a pattern of text that describes one or more strings tomatch when searching for text. You can use regular expressions to find scripttext displayed in the Preview or Script tab of a table property sheet, theEdit/Run Script editor, the Resource Editor, and various other windows.

In order to be able to search for text using regular expressions, you mustselect the Regular Expression check box in the Find dialog box (or Replacein Items dialog box in the Resource Editor) and type a regular expression inthe Find What box.

Regular expressions can contain ordinary characters and the followingmetacharacters :

Metacharacter Description

\ Matches a special character

Examples:

”n” matches “n”. “\n” matches a newline character. “\\”matches “\” and “\(“ matches “(“

^ Matches the position at the beginning of the input string

Examples:

”^Win” matches strings beginning with “Win

$ Matches the position at the end of the input string

Examples:

”then$” matches strings ending with “then”

51

Page 60: Eclipse plugin userguide

Property Sheets

Metacharacter Description

* Matches the preceding character zero or more times

Examples:

”zo*” matches “z” and “zoo”

+ Matches the preceding character one or more times

Examples:

”zo+” matches “zo” and “zoo”, but not “z”

? Matches the preceding character zero or one time

Examples:

”to?” matches either “t” or “to”

. Matches any single character except the newline \n

Examples:

”.ork” matches “Work”, “Fork” etc

[ ] Matches any one of the enclosed character

Examples:

”[abc]” matches “a”, “b”, or “c” A range of character canbe indicated with a dash “[a-z]”

+ For a complete list of metacharacters and their behavior in regularexpressions, see the Visual Basic Documentation .

Validating changes in a property sheet

To validate changes in a property sheet you can use the Apply button tocommit property changes and the OK button to save the property sheetcontents and close it.

Auto commit modeYou can modify the property sheet validation mode in the Options dialogbox. If you select the Auto commit mode, any change is committed as soonas you change field in the property sheet. You have to use the Undo featureto cancel a change.

+ For more information, see “Dialog box general options” on page 68.

52

Page 61: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

v To validate changes in a property sheet

1. Click Apply if you are not in Auto Commit mode.

or

Change field in the property sheet if you are in Auto Commit mode.

Closing a property sheet

v To close a property sheet

1. Click OK or Cancel if you are not in Auto Commit mode.

or

Click the Close button if you are in Auto Commit mode.

53

Page 62: Eclipse plugin userguide

Lists

ListsPowerDesigner lists show objects of the same type belonging to the currentpackage or model. You can add or create objects in lists

You can multi-select items in a list in order to perform mass changes onobject properties. You can select all items in the list by clicking the top-leftcorner box in the list.

You can right-click an object in the list to access a contextual menu offeringthe following options:

♦ Find in Diagram

♦ Find in Model Explorer

♦ Impact Analysis

♦ Edit

♦ Properties

♦ Extended menus (created using the Resource Editor)

The properties of the listed objects are organized in columns. Depending onthe properties of the listed objects, the list may have a natural order. Forexample, a list of columns has an order that must be preserved.

Global lists Global lists are accessible from the Model menu or from the contextualmenu in the Model Explorer, and show all the objects of the type in themodel. The title bar of the list identifies the object type, for example, List ofColumns.

54

Page 63: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

You can open a global list in either of the following ways:

♦ Select Model ä Item .

♦ Right-click a model in the Model Explorer and select List of ä Item fromthe contextual menu.

Displaying shortcuts and objects from sub-packages in a listYou can enable the display of shortcuts in a list by clicking the Includeshortcuts tool. Shortcuts are grayed as they cannot be modified. When youinclude shortcuts whose target model is closed, some information may beunavailable. You can enable the display of Include Sub-packages tools areenabled in the selected list, all the object shortcuts of the current packageand those of the sub-packages appear.

Child lists Child lists are available on certain tabs of object property sheets, and list allof the child objects of that type belonging to the object

For example, when you select the Columns tab in a table property sheet youdisplay the list of columns in the selected table:

List tools

The following tools are available in PowerDesigner lists:

55

Page 64: Eclipse plugin userguide

Lists

Tool Description

Opens the property sheet of the selected item

[ordered lists only] Inserts a row before the selected row in the list

Adds a row at the end of the list

Opens an object selection dialog box to select objects and add themto the list. When you select an item you copy it to the list.

Creates a new object and opens the corresponding property sheet

[CDM only] Opens an object selection dialog box to reuse objects.When you select an item you create a link to the original item, youdo not copy it.

Deletes the row and stores it in the Clipboard

Copies the selected row to the Clipboard

Pastes the contents of the Clipboard

Deletes the row

Opens a Find dialog box to search an item in the list

Finds the symbol in the diagram

Opens a Filter dialog box to define a filter on the list

Enables the filter on the list

Includes objects in sub-packages in the list

56

Page 65: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Tool Description

Includes composite objects in the list (like sub-process, sub-activity,sub state, etc.)

Includes object shortcuts in the list

[Related Diagrams tab] Opens a target model or a diagram**

Opens an object selection list to change the target object of ashortcut

Modifying properties in a list

You can modify the properties of items in a list.

By default, you have to use the Apply button to commit changes and the OKbutton to save the list contents.

You can modify the validation mode of lists in the Options dialog box. Ifyou select the Auto commit mode, any change is committed as soon as youchange a field in the list. You have to use the Undo feature to cancel thechange.

+ For more information, see “Dialog box general options” on page 68.

v To modify properties on a list

1. Select Model ä item to display a list dialog box.

2. Select an item in the list and type changes in the columns correspondingto object properties.

3. Click OK.

Adding items to a list

If a list is ordered you can choose to add an item at the end or at a certainpoint in the list. In general, you are not required to provide any specificproperties when you create an object. However, when you create a linkobject, such as a reference, association link, or inheritance link, you mustspecify the source and the destination.

57

Page 66: Eclipse plugin userguide

Lists

v To add items at the end of a list

1. Click the Add a Row tool or click an empty row at the end of the list

v To insert an item at a particular point of an ordered list

1. Select the item before which you want to insert a new item in the orderedlist, and click the Insert a Row tool.

The new item is inserted before the selected item in the list. It isdisplayed with a default name you can modify.

Arranging items in anordered list

In ordered lists, you can drag and drop objects to reorder them, or use thefollowing buttons at the bottom of the list:

58

Page 67: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Button Moves cursor to

Move to the top of the list.

Move up one page

Move up one line

Move down one line

Move down one page

Move to the bottom of the list

Adding an item from a selection list

Selection lists allow you to select items from a list in order to associate themwith another object.

Most selection lists display objects contained in the current model or inindividual packages contained in that model.

Other selection lists such as the following allow you to display both objectscontained in the current model or its packages and objects contained in othermodels or other packages of these models:

♦ Select Diagrams. From this dialog box you can select the diagram towhich you want to apply pre-defined display preferences.

♦ Add Shortcuts. From this dialog box you can select objects to includethem as shortcut in your model or package.

♦ Add Objects. From this dialog box you can select objects to which youwant to attach extended dependencies.

Object selection The following tools are available in selection lists:

Tool Description

- Model list - Lets you specify a model as the basis for the list.

- Package list - Lets you specify a package as the basis for the list.

59

Page 68: Eclipse plugin userguide

Lists

Tool Description

- Owner List - [PDMs only] Lets you specify a user as the basis forthe list. The list will contain only objects owned by the specifieduser or by no user. If you select User <NONE>, then all theobjects are displayed.

Include Sub-Packages - Includes objects contained in sub-packages (Include Sub-Packages) in the list.

As this tool allows you to display all objects, regardless of theirpackage, some objects in the list may have the same name and bedifficult to identify. In this situation, you can use the CustomizeColumns and Filter tool, to display the Object Location columnto identify where the objects are defined.

Include Composite-Objects - Includes composite objects, such assub-process, sub-activity, sub state, in the list

Include External Shortcuts - Includes shortcuts to objects in othermodels in the list. The model containing the original objects mustbe open for external shortcuts to be available for selection. Whengenerating, external shortcuts are generated as ordinary objects.

Select All - Selects all check boxes in the current object type tab.To selects all check boxes in all object type tabs you can click thearrow and select All Lists or you can press the CTRL key and clickthe Select All tool.

Deselect All - Deselects all check boxes in the current object typetab. To clear all check boxes in all object type tabs you can clickthe arrow and select All Lists or you can press the CTRL key andclick the Deselect All tool.

Use Graphical Selection - Uses the graphical selection.

Move Selected Items to Top - Moves all selected objects to thetop of the list.

Move Selected Items to Bottom - Moves all selected objects tothe bottom of the list.

Customize Columns and Filter - Allows the definition of filterexpression on the columns of the selection list.

For more information about the Customize Columns and Filterdialog box, see “Filtering a list” on page 64.

60

Page 69: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Tool Description

Enable/Disable Filter - Enables or disables the filter. The cur-rently available filter is displayed in the Filter box underneath theobject list.

Use Filter for Selection - Selects objects based on the filterparameters.

CTRL +selectiontool

Applies the action of the selection tool to all object types in thedifferent tabs.

Saving object selections In some selection lists, you can save sets of object selections in your model,so that you can reuse them easily. Note that in case of a database reverseengineering by ODBC, object selections are saved into separated files, asyou can reverse a database without having any model open in the Project.

To save a selection, enter a name in the Selection list at the bottom of theSelection tab then click the Save tool beside the list. The selection is savedas part of the model file. For a database reverse engineering by ODBC, youhave to select a folder before being able to save the object selection into aseparated file.

+ For more information about database reverse engineering by ODBC, seethe “Reverse Engineering a database into a PDM” chapter in the PDMUser’s Guide .

Confirming objectselections

In a selection list, the display of your object selection may be modifiedwhenever you perform one of the following actions:

♦ Change the folder selection using the Model or Package list

♦ Deselect the Include Sub-Packages/Sub-Objects tool

♦ Deselect the Include Shortcuts tool

♦ Apply a filter using the Enable Filter tool

♦ Change the database or owner in the ODBC Reverse Engineering dialogbox

In this case, some objects that have already been selected will no longer bedisplayed, and a dialog box opens offering you the following options:

♦ Select only the objects displayed - Other objects that are no longerdisplayed are deselected.

61

Page 70: Eclipse plugin userguide

Lists

♦ Keep the hidden objects in the selection – All the previously selectedobjects are retained, including those that are no longer shown. Thisallows you to take into account object selections you have made inseveral packages for example.

♦ Cancel - The commit of the selection list is canceled and the selectionpage now displays all objects and sub-objects in the model to let youmodify your selection if necessary.

When you confirm your selection by clicking OK, the confirmation dialogbox will not be displayed again, while you continue to edit your selection,even if you again modify your parameters.

Selecting an object from a selection tree

Browse tab You can expand the tree in the Browse tab of the Select object dialog box toselect an item.

This dialog box opens when for example you:

♦ Select an implementation process in another diagram in the BPM

♦ Insert an RQM in an existing Word document.

♦ Select any object attached to an object state in an OOM

♦ Select a classifier as data type for a class attribute in a class diagram in anOOM

If you double-click an object name in the tree view, you commit theselection and close the dialog box.

62

Page 71: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Index tab From the Index tab, you can search for an object whose name you knowfully or only partially but do not know where the object is defined. Thesearch uses the Display Name/Code option you have defined in the modeloptions. Object names are sorted alphabetically in the list. When you type aname or even just a letter in the expression field, the list automaticallyreturns the corresponding results.

The Properties button above the list allows you to open in read-only modethe property sheet of the selected object. If you select an object name in thelist of the Index tab, then click the Browse tab, the object name isautomatically selected in that tab. In the same way, when you select anobject name in the Browse tab tree view, then click the Index tab, if empty,the expression field is initialized with the selected name, otherwise theexpression content is preserved.

If you double-click an object name in the list, you commit the selection andclose the dialog box.

Note that some selection dialog boxes, which display objects in a tree viewmay not have Browse and/or Index tabs.

63

Page 72: Eclipse plugin userguide

Lists

Filtering a list

A filter restricts the list to those items that meet certain criteria.

PowerDesigner allows you to hide columns, modify column order, or definea filter expression to modify the content of the rows.

v To customize the display of columns and/or define a filter expres-sion1. Click the Customize Columns and Filter tool to open the Customize

Columns and Filter dialog box.

2. Perform any of the following functions to filter the list:♦ Select columns to display by checking the D column

♦ Enter any expressions to filter by in the Expression column. The Usedcheck box in the U column is automatically selected when you enter afilter expression. If you want to keep the expression in memory butdisable it, you can clear this check box.

♦ Use the arrows at the bottom of the dialog to change the order ofcolumns in the list. You can press SHIFT and ENTER or press SHIFT andclick OK to move all the selected rows on top of the list.

64

Page 73: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

3. Click OK to return to the list. The filter is applied by default, and theEnable/Disable filter tool is depressed. Click this tool to toggle betweenenabling and disabling the filter

You only customize the display of the current list. When you have definedcustomization parameters, you have to apply them to the list.

Defining a filter expression

The Expression field in the Customize Columns and Filter dialog box is notcase-sensitive and accepts the following wildcards:

Wildcard Description

* Any string (from none to any number of characters)

? Any character

\* * is a normal character

\? ? is a normal character

The following are examples of filter expressions

Expression String values allowed

W* Work

Washington

*CODE AREA CODE

COUNTRY CODE

CITY CODE

65

Page 74: Eclipse plugin userguide

Lists

Expression String values allowed

????ER Writer

Seller

*_emp_??? div_emp_fun (code for the function of the employee in thedivision)

_emp_idn (code for the identification of the employee in thedivision)

*\? Is this book ready for production?

Closing a list

v To close a list

1. Click Close if you are in Auto Commit mode.

or

Click OK or Cancel if you are not in Auto Commit mode.

66

Page 75: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Setting PowerDesigner General OptionsYou can control the look and behavior of the PowerDesigner interfacethrough the general options. These options are saved in the registry of yourlocal machine.

To set general options, select Tools ä General Options. The followingoptions are available under the General category:

Option Description

Delete: Con-firm objectdeletion

Display a confirmation dialog box when you delete anobject.

Model Ex-plorer : Auto-reload lastproject

Opens the last-edited project when you launch PowerDe-signer. If this option is unchecked, PowerDesigner willopen with an empty project.

Model Ex-plorer drag anddrop: Defaultaction

Allows you to specify the default result of dragging anddropping an object (without any modifier key) in the ModelExplorer. You can choose from the following:♦ Move (Shift) – The object is displaced to the new loca-

tion (parent object, package, model, etc)

♦ Copy (Ctrl) – A copy of the object is created in the newlocation

♦ Create Shortcut (Ctrl + shift) – A shortcut to the objectis created in the new location

♦ Create replica (Alt + shift) – A replica of the object iscreated in the new location

The modifier keys given after the option are valid no matterwhat the default behavior.

Output log:Log path

Specifies the path to the log file where PowerDesignerrecords all of its outputs.

Graphical toolbehavior: Editin place aftercreation

Allows you to directly modify the name of an objectfrom the object symbol in the diagram without openingits property sheet whenever you create an object with thepalette

Sort: NaturalSort

Treats numbers numerically when sorting objects in theModel Explorer. For example, a naturally sorted list oftables would have the order: Table_1, Table_3, Table_12,Table_20.

67

Page 76: Eclipse plugin userguide

Setting PowerDesigner General Options

Dialog box general options

To set general options for dialog boxes, select Tools ä General Options, andselect the Dialog category in the left hand pane. The following options areavailable:

Operating modes

Option Description

Auto Commit Specifies that any change made in a property sheet is auto-matically committed in the object definition. You cancel achange by using the Undo feature.

If this option is disabled, you must click Apply or OK tocommit your changes.

Name toCode mir-roring

Automatically updates the name or code of an object toreflect changes in the other.

Property sheets In PowerDesigner, property sheets appear by default with a certain size and aseries of tabs in the upper part of the dialog box. The following options areavailable for property sheets:

Option Description

Keep size Preserves the customized size you have defined

Keep last tab Opens the property sheet to the last selected tab

Open mode Controls how property sheets are opened. You can choosebetween:♦ Open each object in the same property sheet

♦ Open each object in its own property sheet

Tabs mode Controls the display of tabs. You can choose between:♦ Tabs on one row - Aligns all tabs on a single line with

arrow buttons < and > for browsing

♦ Tabs on several rows - Displays tabs on two lines, theirsize corresponding to the length of their title.

Shortcut property sheets The following options are available:

68

Page 77: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

Option Description

Internal Short-cut

Controls whether double-clicking an internal shortcut opensthe property sheet for the shortcut or for the target object.

You can switch from one mode to the other by pressingthe SHIFT key while opening the property sheet. If thetarget object cannot be found (target model is closed forexample), the shortcut property sheet automatically opens.

External Short-cut

Controls whether double-clicking an external shortcutopens the property sheet for the shortcut or for the targetobject.

+ For more information, see the “Managing Shortcuts” chapter.

Object lists The following options are available:

Option Description

Auto-insertrows

Specifies that a new item is created automatically in a listwhen you click an empty row

Use defaultname

Specifies that new items are given default names uponcreation, allowing you to create multiple new objectswithout having to supply names or other properties.

Specifying text editors

When you are using PowerDesigner, you will need to edit such things asdescriptions and annotations for objects, or generated scripts like SQL in thePDM or Java in the OOM

By default, all files are edited using PowerDesigner’s internal editor. Youcan define an external text editor to launch automatically for editing variouskinds of objects. You can define as many text editors as you need, and thesame file extension can have several text editors allocated, with the firstlisted acting as the default.

v To define a text editor

1. Select Tools ä General Options and click the Editors category in theleft-hand pane.

2. Click the Insert a Row tool, and enter a file extension (such as .DOC,.RTF, .TXT, .XLS) in the Extension column.

The Editor Name and Editor Command columns are both set to<internal> to indicate that the internal PowerDesigner editor will be

69

Page 78: Eclipse plugin userguide

Setting PowerDesigner General Options

used to edit files with this extension.

3. [optional] Enter an editor name (such as MS Word, Notepad, MS Excel)in the Editor Name column, and enter an editor command (such aswinword.exe) in the Editor Command column. You can click the ellipsisbutton in this field to browse to the relevant directory.

4. Click OK to close the dialog box.

Defining environment variables

The following variables are created when you install PowerDesigner:

Variable Description Default

CMD Windows command interpreter command.comor cmd.exe

HOME Variable defining the default home directory —

J2EEVERIF Batch program for verifying if the deploy-ment jar for an EJB is correct

verifier.bat

JAR Command for archiving java files jar.exe

JAVA Command for running JAVA programs java.exe

JAVAC Command for compiling JAVA source files javac.exe

JAVADOC Command for defining JAVA doc comments javadoc.exe

You can edit these variables and add your own.

v To define an environment variable

1. Select Tools ä General Options, and click the Variables category in theleft-hand pane.

2. Click in the row of an existing variable in order to edit its values, or clickthe Add a Row tool to create a new variable.

3. Click OK to close the dialog box.

Variables defined here are used in commands in the Generation\Commandssub-category of the JAVA object language, and can be used in the GenerationTemplate Language.

The syntax for using these variables in GTL requires that you add $ beforethe variable name within the % signs, for example %$CMD%.

70

Page 79: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

+ For more information about the GTL, see the “Generation ReferenceGuide: GTL” chapter in the Advanced User documentation .

Defining named paths

When you add a document or a model to the project, create an externalshortcut, or perform various other file operations, PowerDesigner saves thepaths to these external files in the project or model files.

However, in a team environment, when people exchange model files, thelinks may be broken when one user opens the file of another .

To solve this potential problem, you can define named paths inPowerDesigner. A team leader can define a list of names corresponding toshared resource files and specify a folder structure. Then each team memberrecreates the named paths on his/her workstation.

PowerDesigner provides a number of predefined named paths, each of whichis preceded by an underscore:

Name Path

_DBMS Folder where DBMS definition files are stored

_EXAMPLES Folder where the demo examples are stored

_HOME PowerDesigner installation folder

_LIBRARY Folder where object libraries are stored

_OBJLANG Folder where object language definition files are stored

_PRCSLANG Folder where process language definition files are stored

_RTPLANG Folder where report language definition files are stored

_XEM Folder where extended model definition files are stored

_XMLLANG Folder where XML language definition files are stored

_HOME predefinednamed path

_HOME is a very useful named path that facilitates the installation of youradd-ins without having to modify your XEM or your XML or ActiveXadd-ins commands.

For example: %_HOME%\add-ins\SpellChecker\SpellCheckAddIn.dll

By default, the path of a predefined named path corresponds to theinstallation path you have selected. If you use files proceeding from anotherdirectory, the path of the predefined named paths is not automaticallymodified. You have to carry out this change manually.

71

Page 80: Eclipse plugin userguide

Setting PowerDesigner General Options

You should not modify the name of a predefined named path. If you do so,the predefined named path is preserved in the list and a new named path iscreated with the name and path of the modified predefined named path.

If you modify the path of a predefined named path and want to cancel thechange, you have to select the predefined named path in the list, delete it andclick OK in the General Options dialog box. The next time you open theNamed Path page in the General Options dialog box, the deleted predefinednamed path is displayed in the list with the default installation path.

How named paths are used

Named paths are used when you save a file and open it.

Saving a file When you save a PowerDesigner model or project, the name of a namedpath is substituted for the actual path . For example, if the HOME namedpath is defined as:

HOME = c:\ Program Files\ Sybase

And you have the following path in your model:

c:\ Program Files\ Sybase\ PowerDesigner\ tempo_samples

When you save this file, the path will be saved as:

%HOME%\ PowerDesigner\ tempo_samples

Opening a file When you open a file, named paths are replaced by the value of that path inthe local environment. For example:

%HOME%\ PowerDesigner\ tempo_samples

becomes:

c:\ Program Files\ Sybase\ PowerDesigner\ tempo_samples

If you open a file containing a named path not defined on the currentmachine, the Unresolved Named Path dialog box open, offering you thefollowing options:

♦ Ignore the named path and keep the file name unresolved - The linkbetween files is broken and you may have update problems.

♦ Define a new named path . . . - Allows you to define the path on yourmachine.

♦ Browse another existing variable to replace with – Allows you to resolvethe path using one of your existing names paths.

72

Page 81: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

♦ Directly browse the target file – Allows you to browse for another targetfile. The selected file will replace the file you were trying to open

Creating a named path

You can create additional named paths. Your team should agree on thenames of any named paths to be created.

v To create a named path

1. Select Tools ä General Options, and then click the Named Paths category.

2. Click the Add a Row tool and enter a name and a path for the named path.

3. Click OK.

Defining default interface fonts

You can modify the default font proposed for:

♦ User interface (lists)

♦ Code editor (SQL preview)

♦ RTF editor (description, annotation)

73

Page 82: Eclipse plugin userguide

Setting PowerDesigner General Options

v To define a default font

1. Select Tools ä General Options, and then click the Fonts category.

2. Specify the appropriate font format options.

3. Click OK.

Managing add-ins

An add-in is a module that adds a specific feature or service to

74

Page 83: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

PowerDesigner. PowerDesigner is installed with several add-ins.

Add-in Description

Meta-integrationImport Export

Uses the Meta Integration Model Bridge to import andexport 3rd party file formats. Commands are availablefrom the File ä Import and File ä Export menu. Youneed to purchase bridges from Meta Integration.

www.metaintegration.net

Microsoft Analy-sis Services

Imports multidimensional data from MS SQL Server intoa PDM. Microsoft Analysis Services must be installedon the current machine.

Microsoft WordImport Export

Imports and exports MS Word documents to and fromrequirements models.

.Net Reverse En-gineering

Reverse engineers VB .Net and C# source files.

Spell Checker Uses the MS Word spell checker for PowerDesignerobject names, codes, comments, descriptions, and anno-tations

XML Validation Checks that an XML document conforms to the cur-rent schema in the XML model. This add-in requiresMSXML 4.0

You enable an add-in by selecting its checkbox.

75

Page 84: Eclipse plugin userguide

Setting PowerDesigner General Options

.Net reverse engineering In order to use the .Net binary reverse, you need to register the applicationreverseapp.exe.

.Net Framework 1.1 must be installed. You must use the regasm.exeprogram located in the Windows directory under theMicrosoft.NET\Framework folder. The command line is the following:

regasm /codebase reverseapp.exe

The .net Assemblies command is displayed in the File ä Reverse engineermenu. The executable can also be used separately from PowerDesigner.

ReverseApp -c|-v [-l ] [-r ] [-g]

-l: followed by library file name, this option can be repeated several times.

-r: recursively forces to reverse engineer parameter type and return type.

-g: does not display reverse engineering dialog box and directly proceedswith reverse engineering.

-c: reverse engineers C# model.

-v: reverse engineers VB.Net model.

ReverseApp will retrieve the namespaces, classes, and other objects defined

76

Page 85: Eclipse plugin userguide

Chapter 2. Using the PowerDesigner Interface

in these assemblies and create a corresponding Object-Oriented Model.

System and user add-ins Add-ins installed with PowerDesigner are called system add-ins, and aredeclared in a Local Machine Registry key. If you modify system add-inproperties, you can click the Reset Values For System Add-In tool to recoveradd-in parameters as they are registered in the Local Machine key:

You can create your own add-ins. User-defined add-ins are called useradd-ins, they are declared in a Current User Registry key.

An add-in has the following properties:

Property Description

Name Name of the add-in, this name must be unique in the PowerDe-signer environment. System add-in names cannot be modified

Type Add-in type, it can be ActiveX or XML.

An ActiveX add-in implements a specific interface that definesmethods. These methods are invoked by PowerDesigner in orderto dialog with menus and execute commands that are defined bythe ActiveX.

An XML add-in uses a declarative program with a languagelinked to an .EXE file or a VB script

Comment Additional information about the add-in. System add-in com-ments cannot be modified

File XML file containing the menu and command specifications foran XML add-in

DLL or EXE files for an ActiveX add-in

Class [ActiveX only] Name of the class that implements the ActiveXadd-in interface

Declaring a user-defined add-in

You can create your own XML or ActiveX add-ins. For more informationabout the add-in creation procedure, see the Scripting User’s Guide .

When you create an add-in you must declare it and enable it in the Add-inspage of the General Options dialog box.

v To declare a user-defined add-in

1. Select Tools ä General Options, and then click the Add-Ins category.

2. Click the Add New XML Add-in or Add New ActiveX add-in tool.

77

Page 86: Eclipse plugin userguide

Setting PowerDesigner General Options

3. Enter the name of your add-in in the Name box.

4. Select the XML file corresponding to the XML add-in or select a DLL oran EXE file corresponding to the ActiveX file. You can also use thebrowse tool to select a file.

5. (ActiveX only) Enter the name of the ActiveX implementation class inthe Class box.

6. Click OK.

78

Page 87: Eclipse plugin userguide

CHAPTER 3

Managing PowerDesigner Licenses

About this chapter This chapter explains how to manage PowerDesigner licenses.

Contents Topic: page

Understanding License Management in PowerDesigner 80

Requesting a License from Sybase Product Download Center 86

Using the License Management Wizard 87

79

Page 88: Eclipse plugin userguide

Understanding License Management in PowerDesigner

Understanding License Management inPowerDesigner

PowerDesigner supports a framework of license management common toother Sybase products. This system defines different types of licensescorresponding to different types of use of the product. You can manage thePowerDesigner licenses installed on your machine with a wizard.

This section explains the different types of licenses available inPowerDesigner.

Trial version and Regular licenses

The trial version of PowerDesigner is a free copy of the product used forevaluation purpose whereas a regular license needs to be purchased fromSybase. In both cases you get a full-featured copy of PowerDesigner, but thetrial version is time-limited.

Trial

Definition A trial version is free. It contains all the PowerDesigner features but youcannot use it for more than 15 days after the installation date.

If you need more than 15 days to evaluate PowerDesigner, you can obtain anextension from Sybase. This extension will be provided as a standalone locallicense (see ““Standalone seat - Local license” on page 81”) established for alimited period of time.

Business case You run a PowerDesigner trial version to evaluate the product and compareit with competitors. The trial version is a full-featured version ofPowerDesigner that allows you to perform any design task.

Regular

Definition A regular license needs to be purchased from Sybase or from a reseller.PowerDesigner is available in various packages that provide different levelsof functionality.

Business case You use a license to design models with PowerDesigner.

Local and served licenses

When you are using a PowerDesigner license, you have to choose between alocal license dedicated to your computer and a served license provided by alicense server.

80

Page 89: Eclipse plugin userguide

Chapter 3. Managing PowerDesigner Licenses

Standalone seat - Local license

Definition A local license is designed to be used without a license server. Locallicenses are also called un-served licenses. A local license is dedicated to agiven machine and cannot be used on other workstations.

When you select the Standalone seat - Local license installation option youhave to declare the license file to authorize PowerDesigner on your machine.See the ““Requesting a License from Sybase Product Download Center” onpage 86” section for more information on getting the license file.

Note that all PowerDesigner packages can be installed on your machinewhen you select this installation option. You can evaluate these packages intrial mode for 15 days after installation. However, only authorized packageswill actually work beyond the trial period.

Business case Local licenses are more convenient in smaller design teams, when you donot have many licenses and do not want to setup a license server. Howeverthis configuration requires that you activate the licenses for each machineseparately and implies that you do not have centralized control over yourlicenses.

Standalone seat - Served

Definition A served standalone license is designed to be provided by a server. Aserved standalone license is dedicated to a given machine and cannot be usedby other designers.

This configuration requires that an administrator installs a license server inyour organization (more information on how to setup a license server, seethe “Setting up a License Server” section in the “Installing PowerDesigner”chapter in the Installation Guide ). Then, when you select the Standaloneseat - Served installation option, you will be prompted to define the licenseserver and the PowerDesigner package you want to use in order to fetch theappropriate license from the server and authorize PowerDesigner on yourmachine.

A served standalone license requires:

♦ That you be connected to the license server when you startPowerDesigner for the first time to fetch the license.

♦ That you regularly connect to the license server. If you remaindisconnected from the license server for more than one month, yourlicense will be disabled on your machine. You will have to reconnect tothe server to be able to use your license again.

Business case Served standalone licenses are used in larger design teams, when you want

81

Page 90: Eclipse plugin userguide

Understanding License Management in PowerDesigner

to prevent users from setting up their machine with an Internet connectionfor downloading license files. In this mode, the license is activated once bythe administrator and not for each end user. The connection to a licenseserver may also be considered to be more secure.

You have full control over license usage using the server mode.

Floating license - Served

Definition A served floating license is requested from a shared pool of licenses eachtime you start PowerDesigner. The license server manages the pool oflicenses.

This type of license is not dedicated to a given machine and needs to berequested and returned to the license server after use. This configuration alsorequires that an administrator installs a license server in your organization(more information on how to setup a license server, see the “Setting up aLicense Server” section in the “Installing PowerDesigner” chapter in theInstallation Guide ).

A floating license can also be used in mobile mode. When you need to workdisconnected from the license server, you can borrow a floating license for30 days and work offline during that period. See the ““Mobile mode” onpage 82” section for more information.

Business case Served floating licenses are also used in large design team when you havemore users than licenses but not all users use PowerDesigner at the sametime, they can share a common pool of licenses. The floating licensesolution can be better suited to this kind of organization.

Mobile mode

When you are using a floating license, you can use it in mobile mode. Thismode allows you to use the license without being connected to the licenseserver.

Borrowing a mobilelicense

To use a floating license in mobile mode you need to borrow the license, youcan keep the mobile license for 30 days.

82

Page 91: Eclipse plugin userguide

Chapter 3. Managing PowerDesigner Licenses

v To borrow a mobile license

1. Select Tools ä Take Mobile License.

A confirmation dialog box is displayed.

2. Click Yes to obtain a mobile license and click OK to confirm.

Returning a mobilelicense

When you no longer need the mobile license you should return the license tothe server.

If you do not return the mobile license before 30 days, it is automaticallyrecovered by the server, and disabled on your machine even if you do notconnect to the server. In this case, you do not have to return the mobilelicense the next time you connect to the license server.

v To return a mobile license

1. Select Tools ä Return Mobile License.

A confirmation dialog box is displayed.

2. Click Yes to return the mobile license and click OK to confirm.

License management

This section explains how licenses are managed within PowerDesigner.

PowerDesigner contains a set of models used for designing different types ofinformation. You cannot buy models individually, you must buy a packagethat is a set of PowerDesigner models.

If you are using a served license When you start PowerDesigner theselected package authorization is requested from the license server. In caseof failure PowerDesigner does not start.

If you are using a standalone served license PowerDesigner verifieslicense on the server. If your workstation cannot connect to the license

83

Page 92: Eclipse plugin userguide

Understanding License Management in PowerDesigner

server, you will be able to use your license for 30 days and then it will bedisabled. You need to reconnect to the server to be able to use your licenseagain.

If you are using a local license There is no selected package andPowerDesigner is looking for all licensed packages in the local license file.If a model is not authorized, it will not be available.

Grace period A grace is a 15-day period that allows you to use PowerDesigner without alicense. Grace periods are not granted to floating license users.

You obtain a grace period in the following situations:

♦ When you do not have a license for a model you choose to install (thismodel is flagged “Trial” in the installation component list), you can testthis model for 15 days after the installation date.

♦ When you have a license but you failed to obtain a license from the server(standalone served license) or to read the license file (standalone locallicense), you automatically obtain a grace period for using the product for15 days after the last time you successfully took the license.

Check during executionof floating license

Floating license status is verified regularly in order to check that you are notusing an expired license. If your license server is no longer responding forexample, a modal dialog box is displayed to warn you that you have 24hours to fix the problem. When you click OK, a modeless dialog box isdisplayed 24 hours later to prompt you to save your work, and a finalconfirmation dialog box is displayed before the application shuts down.

Trial expiration When the trial version you have been evaluating expires you can purchase alicense from Sybase to use PowerDesigner. Once you have the license, youmust use the License Management Wizard to define the license configurationyou want to use.

You can also obtain a trial extension from Sybase if you want to furtherevaluate PowerDesigner.

Troubleshooting If PowerDesigner repeatedly fails to obtain authorization from the licensefile you can try to proceed as follows:

♦ Move any file with the .lic extension from the PowerDesigner installationfolder to a safe place.

♦ Make a backup copy of the file sysam.properties, and open it in a texteditor. Remove the lines starting by “Pd.LicenseMode” and“Pd.Package” at the end of the file.

+ For more information about SySAM, you can look at the following Webaddress http://www.sybase.com/sysam.

84

Page 93: Eclipse plugin userguide

Chapter 3. Managing PowerDesigner Licenses

This turns your current installation into a trial version.

If you are still in the 15-day grace period You can use PowerDesignernormally.

If the grace period has expired You are prompted to use the LicenseManagement Wizard to modify the type of license you are using. Thisshould let you re-enter a valid license key.

85

Page 94: Eclipse plugin userguide

Requesting a License from Sybase Product Download Center

Requesting a License from Sybase ProductDownload Center

The Sybase Product Download Center (SPDC) is an online kiosk whereyou can obtain license keys to enable a Sybase software.

A PowerDesigner license key is a file with the .lic extension containing theinformation for authorizing PowerDesigner on your machine.

If you purchased PowerDesigner from Sybase When your order isprocessed, you will receive an E-mail with an URL, your login, and yourpassword for the Sybase Product Download Center. Note that this E-mail issent by subscribenet.com (not Sybase), make sure the subscribenet.comdomain is not listed in your spamfilter otherwise you will not receive thismessage.

If you purchased PowerDesigner from a Sybase reseller When yourorder is processed, you will receive a certificate with a Web key registrationnumber and a download URL.

Host ID and computername

Before accessing the download site, make sure you know exactly yourlicense configuration, the host ID and the name of the computer that willreceive the license key file. You can find the host ID and the computer namein the License Management Wizard. When you select the Standalone Seat -Local License option in the wizard, these details are automatically calculatedand displayed in the second page of the wizard. See the ““Selecting a licensefile” on page 89” section.

If you download the license file for a license server, you also need the hostID and the name of the server. You can find these information on the thirdpage of the license server installation program (see the “Setting up a LicenseServer” section, in the “Installing PowerDesigner” chapter in the InstallationGuide ).

If the computer has several Ethernet cards or if they are supposed to change,you can use the volume serial number, which is another identificationnumber that you obtain by typing dir c: in a DOS prompt window

86

Page 95: Eclipse plugin userguide

Chapter 3. Managing PowerDesigner Licenses

Using the License Management WizardThe License Management Wizard offers the same options as the setupprogram. Note that you do not need to be administrator on your machine toaccess the wizard.

You can use the License Management Wizard to:

♦ Activate a PowerDesigner license, typically when you switch from a trialversion to a regular license.

♦ Modify your license configuration if you switch from one type of licenseto another.

The following use cases explain different situations that may lead to usingthe License Management Wizard.

Use cases

The following use cases explain different situations that may require achange in license configuration.

From trial to license

You have been evaluating a PowerDesigner package with a trial version, andyou have decided to adopt PowerDesigner as your design tool. You canswitch from a trial version to a regular license using the LicenseManagement Wizard.

If you had installed all the package components on your machine Youdo not need to reinstall PowerDesigner, the new license file will activate aregular PowerDesigner version that is not time-limited.

If you had installed only some package components on your machineYou will have to use the setup program to modify your current installation tohave the missing components installed. After setup, you will need theLicense Management Wizard to modify your current license configuration.

Trial extension

Case 1 You have been using a trial version of a PowerDesigner package, and needmore time to further evaluate the product you can obtain an extension fromSybase. The extension is a standalone local license limited for a certainperiod of time. You must change the license type to standalone local to beable to use the trial extension.

Case 2 You are working with a DataArchitect license for example and want toevaluate a trial version of Studio. To do so, you must:

87

Page 96: Eclipse plugin userguide

Using the License Management Wizard

♦ Call Sybase to obtain a trial extension (The extension is a standalonelocal license limited for a certain period of time).

♦ Run the install program in maintenance mode to install the missingStudio components.

♦ Use the wizard to switch to standalone local to be able to use theextension file.

From standalone local to standalone served

More users are using PowerDesigner in your organization and youradministrator has decided to setup a license server to save deployment timeand avoid numerous Internet connections to SPDC from the different localmachines.

Before using the License Management Wizard to change license type, youmust make sure that the license server is running with the appropriate servedlicenses.

From standalone to floating

In large design teams, when all designers are not using PowerDesigner at thesame time, you can switch from standalone to floating licenses. This allowsyou to save money by buying less licenses and putting them in a commonpool of licenses that can be borrowed and returned according to thedesigners’ needs.

Accessing the wizard

You access the License Management Wizard through the Tools ä LicenseParameters command.

When you are in trial mode A license agreement dialog box is displayedwhen you validate the License Management Wizard.

When you are using a floating license in mobile mode A dialog box isdisplayed to prompt you to return mobile licenses before accessing theLicense Management Wizard.

When you are using a served license An error message is displayed ifthe server is not available and you cannot access the wizard.

Selecting a type of license

In the first page of the License Management Wizard you can activate alicense or modify the way your license is provided.

88

Page 97: Eclipse plugin userguide

Chapter 3. Managing PowerDesigner Licenses

License type Description

Standalone seat -Local license

A local license is a dedicated license designed to be usedin a serverless configuration on a single machine.

Standalone seat -Served

A served standalone license is a dedicated licensedesigned to be provided by a server and to be used on asingle machine

Floating license -Served

A served floating license comes from a shared poolof licenses managed by a license server. This type oflicense is not dedicated to a given machine and needs tobe borrowed and returned to the license server after use.

+ For more information on the different types of licenses, see the““Understanding License Management in PowerDesigner” on page 80”section.

Select a type of license and click Next.

Selecting a license file

When you select the Standalone Seat - Local License option, this page

89

Page 98: Eclipse plugin userguide

Using the License Management Wizard

allows you to specify the license file that will be used.

If you already have a license file You can click the Load button andbrowse to the folder where your license file is located. The content of thelicense file is automatically displayed in the License key box. You can clickNext.

If you do not have a license file You need to download one from theSybase Product Download Center. As explained in section ““Requesting aLicense from Sybase Product Download Center” on page 86” you will needto provide either a login and password or a Web key registration to connectto the SPDC site and obtain the license file.

In order to generate the license file, you must specify the host ID andcomputer name of the computer where you will be running thePowerDesigner license. By default, these boxes are initialized with thecurrent computer identification, however if the downloaded license file is tobe used on another machine you must change these default values otherwisethe license will not work on this computer.

If the computer has several Ethernet cards or if they are supposed to change,you can use the volume serial number, which is another identificationnumber that you obtain by typing dir c: in a DOS prompt window.

90

Page 99: Eclipse plugin userguide

Chapter 3. Managing PowerDesigner Licenses

Selecting a license server

When you select the Standalone Seat - Served or the Floating License -Served option, this page allows you to identify the local server where thelicenses will be stored.

You must type the computer name of the server.

You can also type the TCP port number. This is optional, you should onlytype a TCP port number if the administrator who installed the license serverdefined a specific TCP port number. In this case, you must specify thisuser-defined TCP port number.

Selecting a PowerDesigner package

When you select the Standalone Seat - Served or the Floating License -Served option, and after defining the license server, this page allows you tospecify the PowerDesigner package you want to use.

91

Page 100: Eclipse plugin userguide

Using the License Management Wizard

PowerDesigner is available in various packages that provide different levelsof functionality.

A package is available on the server if a license file defines it, the listdisplays all packages available on the server but it does not reflect licenseavailability.

When you select a package that has no available license on the server, anerror message is displayed when you click Finish in the wizard. You canclick Back and modify the selected configuration. You can also click Cancelto restore your previous configuration and wait for a license to be released orask your license administrator to update the license file on the server.

Wizard validation

When you commit the last page of the wizard the following changes occur:

♦ If you have selected a standalone local license, the license fileinformation is added to the license folder as a new license file.

♦ If you have selected a served option (standalone or floating) a new licensefile is created to store the server name and port number.

♦ If you have selected a different package, the new models of the package

92

Page 101: Eclipse plugin userguide

Chapter 3. Managing PowerDesigner Licenses

will be available the next time you start PowerDesigner.

93

Page 102: Eclipse plugin userguide
Page 103: Eclipse plugin userguide

CHAPTER 4

Managing Models

About this chapter This chapter describes model management functions.

Contents Topic: page

Working with Model Files 96

Packages 107

Diagrams 111

Checking a Model 124

Using the Free Model 129

Naming Conventions 130

Spell Checking 147

Applying Model Transformations 149

Resource Files 153

Interchanging Models using the XMI Format 156

Upgrading from Previous Versions of PowerDesigner 158

95

Page 104: Eclipse plugin userguide

Working with Model Files

Working with Model FilesPowerDesigner supports the following types of models:

Model Extension Backup Extension

Requirements Model (RQM) .rqm .rqb

Business Process Model (BPM) .bpm .bpb

Conceptual Data Model (CDM) .cdm .cdb

Physical Data Model (PDM) .pdm .pdb

Information Liquidity Model(ILM)

.ilm .ilb

Object-Oriented Model (OOM) .oom .oob

XML Model (XSM) .xsm .xsb

Free Model (FEM) .fem .feb

Multi-Model report .mmr .bmr

In PowerDesigner the model unit is the basic work environment. You cansplit it for organization purpose in packages and display it with severaldiagrams or document views, the entire set remains the fundamental basisfor your modeling work.

Creating a model

You can create a new model:

♦ In the current project

♦ In a folder

New multi-model report You can also use the New dialog box to create a multi-model report.

+ For more information on multi-model reports, see chapter Managing amulti-model report in the Reports User’s Guide .

Creating a new model

You can create a new model from the New dialog box. This dialog lets youchoose between two creation modes:

New Model You create a new model by default. In this mode, all options (like display

96

Page 105: Eclipse plugin userguide

Chapter 4. Managing Models

preferences or model options) are initialized from the PowerDesignerenvironment (either from the registry or from hard coded default values).

New model fromtemplate

You can create a new model using a model template. In this mode, the modeloptions and preferences are initialized with a model template. A modeltemplate is a set of model options, display preferences, extension, or objectssaved in a model located in the template folder. You use model templateswhen you need to reuse preferences and options in several models.

To create a model template you should create a new model, define theoptions, preferences, and environment of the template, and save this modelinto the template folder. You can create your own templates and save them ina folder. You define this folder for user-defined templates using the ChangeUser-Defined Model Templates Folder tool. The list of templates displaysthe content of both system (if any) and user-defined template folders.

If you wish to turn an existing model into a template, you can use anaccelerator for creating templates: click the Copy Model to User-DefinedModel Templates Folder tool, browse for a model, select it and click Open.The model is copied to the folder of user-defined templates and becomes atemplate available in the list.

To modify a model template you have to modify the model saved astemplate, to do so: open the model saved in the template folder, modifyoptions and preferences, and save it again in the template folder.

Creating a model from existing elements

There are several ways to create a new model from existing elements. Youcan:

♦ Import one or more existing PowerDesigner models

♦ Import one or more Rose or ERwin models

♦ Generate from another type of model or resource

♦ Reverse engineer from another type of model or resource

♦ Open a model from a previous version

+ For more information on the different methods of model creation, seesection on model creation in the different user’s guides.

97

Page 106: Eclipse plugin userguide

Working with Model Files

Model default name *When you create a new model, the following symbol * (star) is displayedbeside the model default name in the Model Explorer, for example Busi-nessProcessModel_1*. This symbol designates the state of a model tobe saved. The first time you save your model, the symbol is no longerdisplayed.

When you select File ä New, you open the model creation dialog box, whichallows you to select the following:

When you select. . . . . . you open

Business Process Model

Conceptual Data Model

Free Model

Information Liquidity Model

Object-Oriented Model

Physical Data Model

Requirements Model

XML Model

A new model of the selected type

Multi-Model Report The Report Editor in order to create a reporton several models

Opening, saving, closing, and deleting models

You open, save, close, and delete models using the File menu or directly inthe Model Explorer.

Opening a model

v To open a model not in the present project

1. Select File ä Open from the PowerDesigner menu bar to open a fileselection dialog.

2. Browse to and select a model, and then click OK.

The model is added to the project and opened in the Model Explorer.

By default, when you open a project, the models linked to project are closed,in order to save working memory.

98

Page 107: Eclipse plugin userguide

Chapter 4. Managing Models

v To open a model which is closed in the project

1. Right-click the model node and select Open from the model contextualmenu.

You can open a model as read-only when you do not need to modify itscontent.

v To open a model as read-only

1. Select File ä Open and select the Open as read-only check box in theOpen dialog box.

or

Right-click a model closed in the project and select Open As Read-onlyin the contextual menu.

The model opens with (Read-only) specified in the title bar.

Saving a model When a model contains unsaved changes, an asterisk is appended to its namein the Model Explorer.

When you save a model or a multi-model report, PowerDesignerautomatically assigns to the file a unique identifying number called GUID(Global Unique ID), and creates a backup copy of your file with the sameidentifying number. The GUID is used:

♦ In the Repository, to allow documents to be identified and updated

♦ During model generation

The following formats are available when you save a model:

Format Description

XML [default] The saving and loading time is longer (1.5x) thanbinary, and the file size is bigger (2.5x) than binary.

You can open and modify the contents of an XML model file.

XML is recommended for small models.

Binary Saving and loading time is shorter than XML, and the file size issmaller than XML

Recommended for big models.

99

Page 108: Eclipse plugin userguide

Working with Model Files

v To save a model

1. Select File ä Save.

or

Click the Save tool in the PowerDesigner toolbar.

or

Right-click the model entry in the Model Explorer and select Save fromthe contextual menu.

If you did not define a file name when you created the new model, theSave As dialog box asks you to indicate a name and a path for the file ofthe new model.

You can create a backup version of a model with the same GUID as theoriginal.

v To save a model as a new file with the same GUID

1. Select File ä Save As.

or

Right-click the model node in the Model Explorer and select Save Asfrom the contextual menu.

You can save the model as a new model with a new GUID. This allows youto develop two separate models in parallel, starting from the same set ofmodel objects.

Note that when you consolidate the new model in the Repository, the Updatemode will not be available. External shortcuts located in the new model mayalso not work properly since the identity of the model has changed.

v To save a model as a new file with a new GUID

1. Select File ä Save As New Model.

or

Right-click the model node in the Model Explorer and select Save AsNew Model from the contextual menu.

You can save the project and all the models it contains with a single click.

100

Page 109: Eclipse plugin userguide

Chapter 4. Managing Models

v To save all models

1. Select File ä Save All.

or

Click the Save All tool in the PowerDesigner toolbar.

Renaming a model You can rename a model in the Model Explorer.

v To rename a model in the Model Explorer

1. Select the model node in the Model Explorer.

2. Click in the selection to make the name editable.

or

Press F2.

or

Right-click the node and select Rename from the contextual menu.

3. Type a new name for the model and press ENTER.

Closing a model When you close a model you free up working memory, but the modelremains available in the project to be re-opened:

v To close a model

1. Right-click the model.

2. Select Close in the contextual menu.

If the model needs to be saved, a Save dialog box is displayed.

The node in the Model Explorer is tagged with a red dot.

Deleting a model When you delete a model, you detach it from the current project, but do notdelete the corresponding file from your disk.

101

Page 110: Eclipse plugin userguide

Working with Model Files

v To delete a model

1. Right-click the model node in the Model Explorer and select DetachFrom Project from the contextual menu.

or

Select the model node in the Model Explorer and press DEL (or click theDelete tool in the toolbar).

The model node and all its related items are removed from the currentproject.

Adding legacy models to the project

Your current models can coexist with non-migrated V6 models like ProcessAnalyst Models (PAM) or Warehouse Architect Models (WAM) and alsoexternal models like ERwin or Rational Rose.

This feature allows you to keep on working with the non-migrated orexternal model application together with PowerDesigner within the sameproject.

v To add a legacy model to your project

1. Right-click the project entry in the Model Explorer and select Add fromthe contextual menu.

or

Drag the model from Windows Explorer, and drop it into the ModelExplorer.

or

Extract the model from the Repository (with the Add to project optionselected and the Open document option deselected).

Each time you add a model to the project, PowerDesigner lets you choosefor each one of them whether you want to:

♦ Add non-migrated V6 models and external models to the project andkeep their original format

♦ Open non-migrated V6 models and external models as PowerDesignermodels

When you choose to add a model to the project and keep its original format,the model opens in its associated application every time you want to open it.

+ For more information on opening a PAM into a CDM, see chapterWorking with Conceptual Data Models in the Conceptual Data Model User’sGuide .

102

Page 111: Eclipse plugin userguide

Chapter 4. Managing Models

+ For more information on opening a PAM into a BPM, see chapterWorking with Business Process Models in the Business Process ModelUser’s Guide .

+ For more information on importing a WAM into a PDM see chapterWorking with Physical Data Model in the Physical Data Model User’s Guide.

Model properties

You can modify the properties of a model from its property sheet.

v To open the model property sheet

1. Double-click the model node in the Model Explorer.

or

Right-click the model node, or the model diagram background, and selectProperties from the contextual menu.

All model types share the following common properties:

Property Description

Name The name of the item which should be clear and meaningful,and should convey the item’s purpose to non-technical users. Bydefault, any new model is called Model n

Code The technical name of the item used for generating code orscripts, which may be abbreviated, and should not generallyinclude spaces

Comment A comment is an optional label that describes a model andprovides more information than the name

Filename Location of the model file. This box is empty if the model hasnever been saved

Author Author of the model. You can insert a name, a space, or nothing.

If you insert a space, the Author field in the title box remainsempty.

If you intentionally leave the box empty, the Author field in thetitle box displays the user name from the Version Info page ofthe model property sheet

Version Version of the model. You can use this box to display therepository version or a user defined version of the model. Thisparameter is defined in the model display preferences

103

Page 112: Eclipse plugin userguide

Working with Model Files

Property Description

Defaultdiagram/view

You can select from the list the diagram or view to display bydefault when you open the model

Generating a model

When you generate a PowerDesigner model, you can define generationtargets, options, and tasks.

Defining a generation target

The Targets page displays a list of target extended model definitions that canbe selected for generation.

If you use an extended model definition to extend a target language, youmust use an extended model definition designed for generation. To do this,you must verify that the Complement Language Generation check box isselected in the Extended Model Definition Editor.

+ For more information on extended model definitions used with targetlanguages, see chapter Generating for a language in the appropriate moduleuser’s guide.

If you use an extended model definition for extended generation, you mustuse an extended model definition designed for generation that does notcomplement the main generation. To do this, you must verify that theComplement Language Generation check box is deselected in the ExtendedModel Definition Editor.

+ For more information on the generation targets, see section Generationcategory, in chapter Extended Model Definition Reference Guide in theAdvanced User Documentation .

The Targets page contains check boxes that allow you to select a categorythat may contain multiple extended model definitions, whereas the radiobuttons allow you to select extended model definitions. The radio buttons aremutually exclusive, as it is only possible to select one extended modeldefinition at a time.

+ For more information on how to create or import an extended modeldefinition, see section Working with extended model definitions in chapterExtended Model Definition Reference Guide in the Advanced UserDocumentation .

104

Page 113: Eclipse plugin userguide

Chapter 4. Managing Models

Defining generation options

You can check your model before generation using the Check Model checkbox. This check box is always available. The generation stops if an error isfound. You must correct this error before starting generation again.

+ For more information on the Check Model feature, see sections onchecking a model in the different user’s guides.

You can add any options you may need during generation in theGeneration\Options sub-category of the target language or extended modeldefinition file. For example, you may want to sort the order in which theoperations are displayed according to their visibility in the OOM.

+ For more information on how to add options for generation, see sectionGeneration category in chapters Object Languages Reference Guide, ProcessLanguage Reference Guide, XML Language Reference Guide and ExtendedModel Definition Reference Guide in the Advanced User Documentation .

The Options page of the Generation dialog box may be empty, this meansthat no option has been defined in the corresponding target file (targetlanguage or extended model definition). If you use Java for example, you canuse standard generation options available by default in this object language.

Defining generation artifacts

The Artifacts tab contains the list of files that will be generated.

+ For more information, see “Customizing the generation of files for anobject” in the “Managing Objects” chapter.

Defining generation tasks

The Tasks page contains standard commands defined in the target languageand/or the extended model definition(s) attached to the model. You canselect any tasks to execute at generation time.

You can add any tasks you may need during generation in theGeneration\Tasks sub-category of the target language or extended modeldefinition file. For example, you may add tasks in your current language inorder to automatically compile files, or run a Java application duringgeneration.

+ For more information on using these tasks in target languages, seesection Tasks category in chapters Process Languages Reference Guide,XML Languages Reference Guide and Object Languages Reference Guidein the Advanced User Documentation.

105

Page 114: Eclipse plugin userguide

Working with Model Files

+ For more information on using these tasks in extended modeldefinitions, see section Commands and tasks in chapter Extended ModelDefinition Reference Guide in the Advanced User Documentation.

You may use a language or an extended model definition that displays theTasks page of the Generation dialog box empty by default. This means thatno task has been defined in the corresponding target language or extendedmodel definition.

Sending a model via a messaging application

PowerDesigner uses the messaging application programming interface(MAPI) to send model files by electronic mail.

This interface lets you use your internal messaging system to send modelfiles directly to other team members. Make sure your current email softwaresupports MAPI or verify your email software settings in Control Panel ä

Internet Options.

v To send a model using a messaging system

1. Select File ä Send to open a profile selection dialog box.

2. Select a profile and click OK.

The file transfers to your internal messaging system, which may ask youfor additional information, such as a destination.

106

Page 115: Eclipse plugin userguide

Chapter 4. Managing Models

PackagesWhen you are working with large models, you can split any model intosmaller subdivisions, or packages, in order to avoid manipulating the entireset of data of the model. Packages can be used to represent different tasks orsubject areas, or to distinguish between development teams.

You can create as many packages as you need in a model. The name of eachpackage must be unique in the model. You can decompose a package intoother packages, and there is no limitation to the decomposition depth.

Packages can contain the same kinds of items as models:

♦ Model objects

♦ Other packages

♦ Diagrams, in order to have different views of the contents of the package.Each package has a default diagram

Creating a package

You can create a package in any of the following ways:

♦ Use the package tool in the diagram palette

♦ Select Model ä Packages to access the List of Packages, and click theAdd a Row tool

♦ Right-click the model or package in the Model Explorer and select Newä Package

When you create a package in models with multiple kinds of diagrams, youmay be required to specify the type of diagram to create in the package.

+ For general information about creating objects, see “Creating an object”in the Managing Objects chapter.

Package properties

Packages have properties displayed on property sheets. All packages sharethe following common properties:

107

Page 116: Eclipse plugin userguide

Packages

Property Description

Name The name of the item which should be clear and meaningful,and should convey the item’s purpose to non-technical users

Code The technical name of the item used for generating code orscripts, which may be abbreviated, and should not generallyinclude spaces

Comment A comment is an optional label that describes a package andprovides more information than the name

Stereotype Sub-classification used to extend the semantics of an objectwithout changing its structure; it can be predefined or user-defined

Defaultdiagram

You can select from the list the diagram to display by defaultwhen you open the package

Use parentnamespace

Option that defines the package as being the area in which thename of an object must be unique in order to be used.

Saving a package

You cannot save a package individually. When you save the model you alsosave all the packages it contains.

Controlling the namespace of a package

PowerDesigner applies uniqueness checks on the names of objects. Thenamespace defines an area in which the name and the code of an object of agiven type must be unique.

♦ For the CDM, PDM, ILM, and FEM - the entire model is, by default, asingle namespace, and all the packages use their parent namespace.PowerDesigner applies checks on uniqueness at the model level.

♦ For the OOM, RQM and BPM – each package is, by default, a separatenamespace. PowerDesigner applies checks on uniqueness at the packagelevel.

Depending on the type of model where you create a new package, the UseParent Namespace check box is selected in the package property sheet.

XSM namespaceThe XML model does not support packages. For more information onnamespaces in the XSM, see the XML Model User’s Guide .

108

Page 117: Eclipse plugin userguide

Chapter 4. Managing Models

In the following example, the class Printer is located in the PeripheralPackage of an OOM where each package is, by default, a separatenamespace:

If you were to select the Use Parent Namespace check box in the propertysheet of Peripheral Package, the internal names of objects in this packagewould no longer be prefixed by the name of the package. The parent of thefolder, in this case the model itself, becomes the namespace, and you couldnot create a Printer class in the Internal Network package, becausePowerDesigner would verify its uniqueness in the entire model.

v To define the namespace of a package

1. Open the property sheet of the package.

2. Select or clear the Use Parent Namespace check box.

109

Page 118: Eclipse plugin userguide

Packages

3. Click OK to return to the model diagram.

110

Page 119: Eclipse plugin userguide

Chapter 4. Managing Models

DiagramsA diagram is a graphical view of a model or a package. All models andpackages have at least one diagram.

Requirements Model viewsIn the Requirements Model, there are no diagrams, but rather views. Formore information, see the Requirements Model User’s Guide .

You can add additional diagrams to a model or package to split the displayand focus on certain portions of the system. You can also use multiplediagrams to focus on different subject areas. They allow you to see thesymbols of the same objects, displayed with different kinds of information.

For example, in a Publishing model, different diagrams could define thedifferent activities involved in this industry: the printing diagram, the salesdiagram, the accounting diagram, the book selection committee diagram.

Creating a diagram

By default, any model or package opens with a default diagram. You cancreate as many diagrams as you want in a model or in a package.

You can create a diagram in any of the following ways:

♦ Select View ä Diagram ä New Diagram ä Diagram .

♦ Right-click the background of your diagram and select Diagram ä NewDiagram ä Diagram from the contextual menu

♦ Right-click the model node in the Model Explorer and select New ä

Diagram from the contextual menu

In each case you will be invited to specify a name, code, and optionalcomment for the new diagram.

Diagram properties

You can modify an object’s properties from its property sheet. To open adiagram property sheet, right-click its Model Explorer entry and selectProperties from the contextual menu, or right click the diagram backgroundand select Diagram ä Properties from the contextual menu. The General tabcontains the following properties:

111

Page 120: Eclipse plugin userguide

Diagrams

Property Description

Name Specifies the name of the item which should be clear andmeaningful, and should convey the item’s purpose to non-technical users

Code Specifies the technical name of the item used for generatingcode or scripts, which may be abbreviated, and should notgenerally include spaces

Comment Additional information concerning the diagram

Parent Specifies the name of the parent model or package

Stereo-type

Specifies a stereotype for the diagram. For example, a statechartdiagram can serve to model page flows in JSF and other webframeworks.

You can use a profile to provide special processing for diagramsand other objects carrying stereotypes. For more informa-tion, see the “Managing Profiles” chapter in Advanced UserDocumentation .

Page scale Sets a default display for page scale. The page scale percentagelets you define a page size according to your modeling needs.If you have a lot of objects on several pages, you can reducethe page scale percentage in order for all the objects to fit on asingle printable page

DefaultDiagram

Diagram by default. This check box is automatically selected ifthe diagram is the first created diagram

Navigating between and opening existing diagrams

You can open a diagram in any of the following ways:

♦ Double-click the diagram entry in the Model Explorer.

♦ Press CTRL + D, or select View ä Diagram ä Select Diagram to open theSelect Diagram dialog box, select a diagram node in the tree and clickOK.

112

Page 121: Eclipse plugin userguide

Chapter 4. Managing Models

♦ In the case of package diagrams, you can additionally:• Select the Open Package Diagram tool from the Palette and click on a

package symbol.

• Press CTRL and double-click a package symbol.

• Right-click a package symbol and select Diagram ä Open Diagramfrom the package contextual menu.

Showing and hiding diagram symbols

Not all PowerDesigner model objects have symbols. For those that do, thesymbol is, by default, displayed in the diagram when you create the object.You can subsequently choose to show or hide the symbol.

Hiding a symbol

Hiding certain symbols can improve the readability of your diagram. Whenyou hide a symbol you do not delete it or the object.

v To hide a symbol from the Symbol menu

1. Select one or several symbols in the diagram.

2. Select Symbol ä Hide Symbols from the contextual menu.

The symbols are hidden in the diagram.

Hidden link objectsWhen you hide an object with link objects connected to it, the linkobjects are also hidden. For example, if you hide a table symbol thathas a reference to another table, the selected table will be hidden withthe reference.

113

Page 122: Eclipse plugin userguide

Diagrams

v To hide a symbol from the Show Symbols dialog box

1. Select Symbol ä Show Symbols (or right-click the diagram backgroundand select Diagram ä Show Symbols from the diagram contextual menu)to open the Show Symbols dialog box.

2. Deselect the check box beside the visible symbol.

3. Click OK to return to the model diagram.

Displaying a hidden symbol

You can redisplay a hidden symbol.

v To display a hidden symbol

1. Select Symbol ä Show Symbols (or right-click the diagram backgroundand select Diagram ä Show Symbols from the diagram contextual menu)to open the Show Symbols dialog box.

2. Select the appropriate object type sub-tab and select the check box besidethe appropriate symbol.

3. Click OK to return to the model diagram.

Working with the Show Symbols dialog box

The Show Symbols dialog box displays all objects belonging to the currentpackage. You can select objects from other packages for display in thecurrent diagram using the Add Objects tool.

114

Page 123: Eclipse plugin userguide

Chapter 4. Managing Models

Object symbols are organized by object type in sub-tabs. Only relevant tabsare displayed. For example, if your package contains only tables andreferences, only the Table tab will be available, as references are containedin table definitions. If shortcuts, extended dependencies and/or free symbolsare present in the package, they appear on their own sub-tabs.

The following tools are available for selecting symbols:

Tool Description

Allows you to select objects from other packages to displaythem in the current diagram.

Selects all check boxes in the current object type page orselects all check boxes in all object type pages when youclick the Down Arrowhead and select All Pages

Deselects all check boxes in the current object type page ordeselects all check boxes in all object type pages when youclick the Down Arrowhead and select All Pages

Moves all selected object to the top of the list

Moves all selected object to the bottom of the list

CTRL + selec-tion tool

Selects all items in all object type pages

Symbol deletionYou cannot delete a symbol from the Show Symbols dialog box. When asymbol is hidden it is not deleted.

Show symbol directly inthe diagram

If an object has no symbol, you can show it directly in the diagram withoutusing the Show Symbols dialog box, by using the:

♦ Drag and Drop feature

♦ Paste as Shortcut command

115

Page 124: Eclipse plugin userguide

Diagrams

Action Result

Standard Drag and Drop from ModelExplorer to diagram

Object symbol created in thedestination diagram

Drag and Drop from diagram todiagram + Create shortcut optionselected (General Options)

or

Copy symbol + Paste as Shortcutcommand from diagram to diagram

Object symbol created in thedestination diagram with symbolformat parameters and relativeposition preserved

+ For more information on the Drag and Drop feature and the Paste asShortcut command, see respectively sections Dragging and dropping objectsand Pasting an object as a shortcut in chapter Managing Objects.

Understanding automatic link completion

The following rules apply to the display of link objects in the diagramwindow.

General rules

Object Check box Result in the diagram. . .

Link Selected Objects at both ends are automatically dis-played

Any Deselected Link objects attached to the hidden object areautomatically hidden

Non link Selected Link objects attached to the displayed non linkobject are automatically displayed if their otherending object is already displayed

CDM special behavior

116

Page 125: Eclipse plugin userguide

Chapter 4. Managing Models

Object Check box Result in the diagram. . .

Associa-tion

Selected Entities and association links attached to thedisplayed association are automatically dis-played

Associa-tion link

Selected Entities and associations attached to the dis-played association link are automatically dis-played

Inheritance Selected Entities (parent and children) and inheritancelinks attached to the displayed inheritance areautomatically displayed

Inheritancelink

Selected Entities (parent and children) and inheritanceattached to the displayed inheritance link areautomatically displayed

Parent en-tity

Deselected Inheritances for which the hidden entity is theparent are automatically hidden

Finding an object symbol in the diagram

You can locate any object with a symbol in a diagram or among severaldiagrams using Find in Diagram (or, for an RQM, Find in Document View).Objects without graphical symbol such as domains cannot be found in thediagram.

If the object has only one symbol, the appropriate diagram is opened withthe object symbol centered. If the object has several symbols, a dialog boxopens to allow you to select one.

This feature can be very useful if you are looking for the target object ofshortcut symbols, as you can access the target object from the shortcutproperty sheet and then locate the target object in the diagram.

Find in Diagram (or Find in Document View) is available from:

♦ The Model Explorer

♦ The Modeling Result List

♦ The object property sheet dropdown menu

♦ An objects list

117

Page 126: Eclipse plugin userguide

Diagrams

v To find an object symbol from the Model Explorer

1. Right-click an object in the Model Explorer and select Find in Diagram(or Find in Document View) from the contextual menu.

v To find an object symbol in the diagram from the Modeling ResultList

1. Right-click an object in the Modeling Result List and select Find inDiagram (or Find in Document View) from the contextual menu.

v To find an object symbol in the diagram from its property sheet

1. Open an object property sheet and select Find in Diagram (or Find inDocument View) from the dropdown menu at the bottom-left corner.

v To find an object symbol in the diagram from an objects list

1. From an objects list, select an object in the list and click the Find Symbolin Diagram tool in the list toolbar.

Defining related diagrams

You can define Related Diagrams to attach an object to one or severaldiagrams others than the ones it was created in. This feature can be used tofurther define the behavior and implementation of objects . It allows you toview objects from different angles and describes a semantic relationships.

You can associate any type of diagram open in the project with an object,including diagrams from other packages or models.

Adding related diagrams

You can only attach related diagrams to objects that have a RelatedDiagrams tab in their property sheet.

v To add a related diagram

1. Open the property sheet of the object and click the Related Diagrams tab.

2. Click the Add Objects tool to open a selection window.

3. Select a model in the list, and then select the diagram to attach.

4. Click OK to return to the object property sheet.

The diagram is displayed in the list of related diagrams of the object.

118

Page 127: Eclipse plugin userguide

Chapter 4. Managing Models

Opening related diagrams

You can open a related diagram from the property sheet of an object.

v To open a related diagram from an object property sheet

1. Open the property sheet of the object and click the Related Diagrams tab.

2. Select a diagram from the list, and then click the Open Diagram tool.

The selected diagram is opened in the diagram window, behind the objectproperty sheet.

3. Click OK to access the related diagram.

Saving a diagram

You cannot save a diagram individually, as it only represents a view of amodel or package. When you save a model, you save the diagram in itspresent state of magnification.

Deleting a diagram

When you delete a diagram, you delete a view of a model or a package. Thisaction does not affect the objects in the model or package.

You can delete a diagram in any of the following ways:

♦ Select the diagram node in the Model Explorer and press the DEL key.

♦ Right-click the diagram window background and select Diagram ä

Delete from the contextual menu.

♦ Select View ä Diagram ä Delete.

Converting a diagram to a package

PowerDesigner lets you convert a diagram to a package.

You can move all the objects in the diagram to the new package or specifyonly certain objects. Other objects will stay in their original package and berepresented via shortcuts in the new package.

The linking objects that you move keep their links in the target package anda shortcut is usually created in the source package. The general rule beingthat conceptual modeling must be preserved.

Shortcuts creation rules in PowerDesigner also apply to moving objectsbetween packages.

119

Page 128: Eclipse plugin userguide

Diagrams

+ For more information on shortcut creation, see the Managing Shortcutschapter.

v To convert a diagram to a package

1. Select View ä Diagram ä Convert to Package.

or

Right-click the diagram background window and select Diagram ä

Convert to Package from the contextual menu.

or

Right-click the diagram node in the Model Explorer and select Convert toPackage from the contextual menu.

In each case, the Convert Diagram to Package wizard opens. By defaultthe sub-package takes the name of the diagram.

2. [optional] Enter a different name and code for the new package.

3. Click Next to open the Selecting Objects to Move page.

This page lists all the objects in the diagram available to move to the newpackage. Objects are organized by object type, with a sub-tab for eachobject type. By default, all the objects are selected.

120

Page 129: Eclipse plugin userguide

Chapter 4. Managing Models

4. [optional] Deselect any objects you do not want to move to the newpackage. Objects deselected here will remain in the original package andbe represented in the new package via shortcuts.

5. Click Finish to create the new package and move the selected objects to it.

The new package and diagram are added in the Model Explorer.

Moving a diagram to a package

In some cases, you may want to move a diagram and some or all of theobjects it contains into another package (or composite object such as processor activity).

The linking objects that you move with the diagram keep their links in thetarget package and a shortcut is usually created in the source package. Thegeneral rule being that the design of the original diagram must be preserved.

Shortcut creation rules in PowerDesigner also apply to moving objectsbetween packages.

+ For more information on shortcut creation, see chapter Managingshortcuts.

You can simply drag and drop the diagram from one package to another inthe Model Explorer. All objects in the diagram are automatically moved tothe target package.

You can use the wizard to control which objects in the diagram are moved tothe new package.

121

Page 130: Eclipse plugin userguide

Diagrams

v To move a diagram to a package using the wizard

1. Select View ä Diagram ä Move to Package.

or

Right-click the diagram background window and select Diagram ä Moveto Package from the contextual menu.

or

Right-click the diagram node in the Model Explorer and select Move toPackage from the contextual menu.

In each case, the Move Diagram to Package wizard opens:

2. Select a target package in which you want to move the current diagramand click Next to open the Selecting Objects to Move page.

This page lists all the objects in the diagram available to move to the newpackage. Objects are organized by object type, with a sub-tab for eachobject type. By default, all the objects are selected.

122

Page 131: Eclipse plugin userguide

Chapter 4. Managing Models

3. [optional] Deselect any objects you do not want to move to the newpackage. Objects deselected here will remain in the original package andbe represented in the new package via shortcuts.

4. Click Finish to move the diagram to the new package.

Last diagram in packageIf the last diagram is moved or deleted from a package, a new diagram isautomatically created as all packages must contain at least one diagram.

Moving entities between packages in a CDM

In a CDM, when moving entities containing data items from one package toanother, the following rules apply:

Data items Namespace Move result

Only used by se-lected entity

Move within thesame namespace

The data items are moved with theentity

Reused amongdifferent entities

Move within thesame namespace

Shortcuts of data items are createdfor reused data items

Used only by oneentity or reusedamong differententities

Change names-pace

Data items are copied in the othernamespace

123

Page 132: Eclipse plugin userguide

Checking a Model

Checking a ModelYou can check the validity of your model at any time. We recommend thatyou check your model before generating code or another model from it. TheCheck model option is enabled by default in the Generate dialog box and, ifan error is found, the generation is stopped.

v To check your model

1. Press F4, select Tools ä Check Model, or right-click the diagrambackground and select Check Model from the contextual menu to openthe Check Model Parameters dialog box.

The options tab lists the types of objects to be checked, and the individualchecks to be performed are displayed with symbols indicating theirseverity:

2. [optional] Select or deselect types of objects to check, and expand objectnodes to enable, disable, vary the severity of, and enable or disableautomatic correction of individual checks (see “Check model parametertools” on page 126).

Getting documentation for object checksRight-click a check in the Check Model Parameters dialog box andselect Help from the contextual menu to display its documentation.

3. [optional] Click the Selection tab, and select or deselect individualobjects for checking. Sub-tabs are available for each type of object:

124

Page 133: Eclipse plugin userguide

Chapter 4. Managing Models

Selecting objects in the diagramIf you have selected object symbols in your diagram before startingthe model check, you can select them for checking by clicking the UseGraphical Selection tool in the Selection tab tool bar.

For more information about selecting objects in Selection tabs, see the“Adding an item from a selection list” section in the “Using thePowerDesigner Interface” chapter.

4. [optional] Click Apply to save your selections so that they will beavailable for future model checks.

5. Click OK to launch the model check.

The Check Model Modeling Result List displays errors and warningsbased on the check options you have defined. For information about howto correct errors, see “Correcting errors in the check model ModelingResult List” on page 127.

125

Page 134: Eclipse plugin userguide

Checking a Model

Check model parameter tools

The following tools are available in the Check Model Parameters dialog box:

126

Page 135: Eclipse plugin userguide

Chapter 4. Managing Models

Tool Description

Select All – Click the arrow to the right of this tool to choose toselect all checks, all error checks, or all warning checks.

Deselect All - Click the arrow to the right of this tool to choose todeselect all checks, all error checks, or all warning checks.

Error – Sets the selected check to error level. The check iconwill change accordingly. When errors are encountered, any modelgeneration is stopped.

Warning - Sets the selected check to error level. The check icon willchange accordingly. Warnings do not prevent generation from yourmodel.

Automatic correction – [enabled if automatic correction is availablefor the selected check] Enables automatic correction for the selectedcheck. The check icon will change to bear a small red cross in itsbottom-right corner.

You should be aware of how automatic corrections can affect yourmodels. For example, in a PDM, if a column code length is longerthan the length specified in the MaxColumnLen field in the DBMS,then PowerDesigner can automatically truncate the code to thespecified length. However, such truncation can make create duplicatenames and PowerDesigner will automatically rename the duplicatedcolumn code. If you do not want this to occur, you should deselectautomatic correction for column code uniqueness.

All problems that can not be corrected automatically must be cor-rected manually. For example, in a PDM, PowerDesigner will notcreate a column for an existing index, and you will need to create theappropriate column.

Correcting errors in the check model Modeling Result List

When errors and warnings are encountered during model checking, they arelisted in the Check Model Modeling Result List pane. You can correct theproblems either by invoking a automatic correction (if available) or byopening the property sheet of the affected object and correcting it manually.

The following tools are available to assist you in correcting problems withyour model. If this toolbar is not displayed, select Tools ä CustomizeToolbars, select Check, and click OK.

127

Page 136: Eclipse plugin userguide

Checking a Model

Tool Description

Correct error – Opens the property sheet of the affected object toallow you to correct the error.

Display help – Provides documentation for the error or warning.

Check again – Re-performs the check, to allow you to verify yourcorrection.

Automatic correction – Only available if an automatic correction isdefined for this kind of error. Performs the automated correction.

First error – Goes to the first error in the list.

Previous error - Goes to the previous error in the list.

Next error - Goes to the next error in the list.

Last error - Goes to the last error in the list.

Right click menuThese and other options are also available by right-clicking an item in theCheck Model Modeling Result List.

128

Page 137: Eclipse plugin userguide

Chapter 4. Managing Models

Using the Free ModelThe Free Model (FEM) allows you to create any kind of chart, diagram, in acontext-free environment. For example, you could create a model torepresent:

♦ how your models and documents relate to each other

♦ the organizations in your enterprise and how they interrelate

♦ a flowchart

♦ a hierarchy diagram

♦ the graphics you use in PowerPoint presentations and link them to thepresentations they are used in

♦ the users in your Enterprise Repository and link them to symbolsrepresenting the groups they belong to

♦ an ORM model using ORM specific extended model definitions

You can enrich the diagrams in the Free Model by selecting differentbitmaps for each symbol and add extended attributes to collect specificmetadata. VBScript and the Generic Generator make it possible to programyour own semantics into this model and create specific generated code orother output particular to your own interpretation.

129

Page 138: Eclipse plugin userguide

Naming Conventions

Naming ConventionsYou can define naming conventions for your model objects in the ModelOptions dialog box. You can:

♦ Set rules to enforce predefined name and code formats for all the objectswithin a model. When you type a name or a code that does not respect theconventions, PowerDesigner adapts them to the required format. See“Name/Code Format” on page 130.

♦ Set conversion scripts in order to generate objects name from their codeor objects code from their name using specific macros and conversiontables. This feature is only available when you select the Enablename/code conversion option. See “Name and code conversion scripts”on page 135.

Name into code conversion during inter-model generationThe name into code conversion is particularly useful for inter-modelgeneration, as it allows you to define how you want the codes of yourmodel objects to be generated. For more information on the nameinto code conversion during the inter-model generation, see section oninter-model generation options in the different modules user’s guides.

Name/Code Format

Name and code format encompasses constraints on length, character caseand type for the name and the code of objects.

You can set name and code format for:

♦ Models and packages

♦ Model objects

♦ Reusable templates

Displaying the name or the code of objects

You can define whether the names or codes of objects are displayed.

v To define the display of names or codes

1. Select Tools ä Model Options to open the Model Options dialog.

2. Select the Naming Convention node in the Category tree view.

130

Page 139: Eclipse plugin userguide

Chapter 4. Managing Models

3. Select the Name or Code radio button in the upper part of the dialog box.

4. Click OK to return to the model diagram.

Defining name and code format for a type of object

You can specify name and code formats for each type of object in a model.

131

Page 140: Eclipse plugin userguide

Naming Conventions

v To define name and code format for a type of object

1. Select Tools ä Model Options to open the Model Options dialog box.

2. Select an object type beneath the Naming Convention node in theCategory tree view.

Other Objects category

Select the Other Objects category to define name and code format formodels and all objects that are not visible in the tree view.

3. Complete the appropriate properties on the Name and Code tabs (see“Name and Code format properties” on page 134).

4. Click OK to return to the model diagram.

Creating a template for name and code format

You can define a template for name and code formats and reuse it for severaltypes of objects.

v To create a template for name and code format

1. Select Tools ä Model Options to open the Model Options dialog box.

2. Select the Naming Convention node in the Category tree view.

132

Page 141: Eclipse plugin userguide

Chapter 4. Managing Models

3. Click the Ellipsis button beside the Naming Template box to open theList of Naming Templates:

4. Click the Add a Row button and type a naming template name.

5. Click the Properties tool to open the new naming template property sheetto the Detail page:

6. Complete the appropriate properties (see “Name and Code formatproperties” on page 134).

7. Click OK to return to the model diagram.

133

Page 142: Eclipse plugin userguide

Naming Conventions

Naming template modificationYou can modify name and code format for a template by selecting itfrom the Naming template list and clicking the Properties tool besidethe Naming template box.

Applying a naming template to a type of object

You can apply a naming template to any number of object types in yourmodel.

v To apply a naming template to an object type

1. Select Tools ä Model Options to open the Model Options dialog box.

2. Select an object type beneath the Naming Convention node in theCategory tree view.

3. Select the Name or Code tab and then select a template in the NamingTemplate list.

The values of the selected template appear in the name format boxes.

4. Click OK to return to the model diagram.

Name and Code format properties

The following options are available for formatting names and codes:

Option Description

DisplayName

Displays the names of objects in the interface

Display Code Displays the codes of objects in the interface

Enablename/codeconversions

Enables the use of conversion scripts and conversion tablesto generate a code from a name or a name from a code. Seesection “Name and code conversion scripts” on page 135

Naming Tem-plate

Specifies a template for name and code format

134

Page 143: Eclipse plugin userguide

Chapter 4. Managing Models

Option Description

MaximumLength

Maximum number of characters. In a PDM, this maximumnumber of characters can come from the Registry (if youdefined a Maximum length and clicked the Set As Defaultbutton) or from the DBMS definition file. If a maximumlength is declared in both the Registry and the DBMS,PowerDesigner uses the length with higher constraint. Forexample, in the case where the Registry = 128 and the DBMS= 30, PowerDesigner uses 30 characters for maximum length

CharacterCase

Indicates authorized character cases: Uppercase, Lowercase,and Mixed Case

Valid Charac-ters

List of authorized characters.

You can specify a single character or character string inquotation marks. For example:"a", "xyz"

You can specify an interval of characters between singlequotation marks separated by a dash. For example:’a’-’z’’a’-’z’, ’A’-’Z’, ’0’-’9’

By default, PowerDesigner allows the following valid char-acters for codes: ‘a’-’z’,’A’-’Z’,’0’-’9’,”_”

All Valid Accepts all characters.

Invalid Char-acters

List of unauthorized characters. By default, PowerDesignerdefines the following invalid characters for names:

”+-*/\.,!:;”

No Accents Removes accents from accented characters.

Default Char-acter

Character used to replace any invalid characters entered.

Name and code conversion scripts

You can set conversion scripts in order to generate the name of an objectfrom its code or vice versa using conversion scripts and tables. Name/codeconversions can be applied to all named objects in a model or for each typeof object individually.

You must select the Enable name/code conversions check box in the upperpart of the Naming Convention page of the Model Options dialog box for

135

Page 144: Eclipse plugin userguide

Naming Conventions

this feature to be available.

Enable name/codeconversion option

Name/code behavior

Selected Use of conversion scripts and conversion tables togenerate a code from a name or a name from a codetogether with the application of naming conventions

Unselected Names are copied from codes or codes are copiedfrom names together with the application of namingconventions

Name to Code mirroringmode

When you create an object in PowerDesigner, you may have to type a nameand click the Equal button after the Code box to set the code equal to thename because the Name to Code mirroring mode may not be selected in theGeneral Options dialog box.

You can select this operating mode to automatically set the code equal to thename and thereby apply the conversion scripts you defined to both namesand codes.

+ For more information on the Name to Code mirroring option, seesection Defining dialog box operating mode in chapter using thePowerDesigner interface

Conversion scripts allow you to alternatively generate a code from a nameand a name from a code. You define conversion scripts from thecorresponding tabs in the Naming Convention page of the Model Optionsdialog box. Usually name into code conversion is the most commonly used:

Tab Description

Name To Code You use it when you want to generate a code from a name

Code To Name You use it when you want to generate a name from a code

Each tab allows you to:

♦ Define a conversion script in the Conversion Script edit box to generatethe name from the code or the code from the name using macros

♦ Select a conversion table from the Conversion table list. This allows youto convert an expression to another, when using the .convert_name or.convert_code macros. For more information on macros, see section“Using a conversion script” on page 137. The use of conversion tables isoptional

136

Page 145: Eclipse plugin userguide

Chapter 4. Managing Models

Using a conversion script

Default conversion scripts allow you to generate names from codes andcodes from names using macros. These are macros used in the GenerationTemplate Language (GTL) and recommended for the name/codeconversions.

Conversion scripts are used when you click the Equal button after a Name ora Code box in the object property sheet or when you have selected the Nameto code mirroring option in the Dialog page of the General Options.

You can customize the default conversion scripts using any of the followingmacros:

♦ .foreach_part

♦ .convert_name & .convert_code

♦ .lowercase

♦ .uppercase

♦ .replace

♦ .delete

+ For more information on the syntax of macro keywords used in theGeneration Template Language (GTL), see section Using macros in chapterGeneration Reference Guide in the Advanced User Documentation .

137

Page 146: Eclipse plugin userguide

Naming Conventions

.foreach_part macro

The .foreach_part macro allows an iteration on each part of an expression.The part separators will be specified into a pattern expression.

This macro is very useful when dealing with inter-model generation, asmodels can have very different naming conventions. For example a Javaclass attribute code may be “customerName” whereas a PDM table columncode may be “CUSTOMER_NAME”.

Syntax

. foreach_part (<Expression> [, <Separator Pattern>[,<Head> [,<Tail>]]])

[<Block>].next[(<Separator>)]

Parameters

Parameter Description

<Expression> Designates the expression scanned by the part iterator. Thispart iterator will stop on each character specified into the<PartSeparatorPattern>

<SeparatorPattern> (op-tional)

Defined into a double quoted string. Any character speci-fied into the pattern will be used as a part separator.

See below

<Block> Encompasses the following variables:

%CurrentPart%: Current part value,

%IsFirst%: Determines if the current part is the first part ofthe expression,

%IsLast%: Determines if the current part is the last part ofthe expression

<Separator>(optional)

A <separator> can be concatenated between eachpart. If you defined a character separator in the<PartSeparatorPattern>, the value of the <separator>will replace the character separator. If you defined a rangeseparator in the <PartSeparatorPattern>, the table conver-sion you selected will return the corresponding value toreplace the range separator

<Head> or<Tail> (op-tional)

Expressions that can be added respectively at the beginningor at the end of the generated expression

138

Page 147: Eclipse plugin userguide

Chapter 4. Managing Models

Separator There are two types of separator:

♦ A character separator that must be defined into an additional simplequote and writes as follows: (%Name,”’<char>”’)

♦ A range separator that must be used with a conversion table and writes asfollows: (%Name,”[<c1>-<c2>]”)

Both can also be combined: (%Name,”’<char>’,[<c1>-<c2>]”).‘<char>’ can be any character specified into the pattern for example: a, b ,c, 0, 9.

[<c1> - <c2>] specifies a character taken into the range defined betweenthe two characters <c1> and <c2>. For example, [A-Z], [a-z] or [0-9]” canbe used as part separators.

By default, the <PartSeparatorPattern> is initialized by the pattern “ -_,\t”.If the specified pattern is empty the pattern is initialized using the defaultvalue.

Examples

♦ Script 1: Convert a name into a class code (JAVA naming convention)

.foreach_part(%Name%, "’ _-’")%.FU:CurrentPart%.next

The conversion script will output:

Name = Employee shareholder => Code = EmployeeShareholder

♦ Script 2: Convert a name into a class attribute code (JAVA namingconvention)

.set_value(_First, true, new)

.foreach_part(%Name%, "’ _-’")

.if (%_First%)%.L:CurrentPart%.set_value(_First, false, update).else%.FU:CurrentPart%.endif.next

The conversion script will output:

Name = Employee shareholder => Code = employeeShareholder

.convert_name & .convert_code macros

The .convert_name & .convert_code macros use a conversion table to getthe corresponding code from a name or the corresponding name from a code.

139

Page 148: Eclipse plugin userguide

Naming Conventions

The .convert_name macro uses the conversion table of a name into a codeand the .convert_code macro uses the conversion table of a code into a name.When no occurrence is found in the table, the name or the code is returned.

You can use these macros together with a user-defined conversion table thatyou select in the Conversion Table list.

Conversion tables are not case sensitive. You can indifferently uselower-or-uppercases in tables.

+ For more information on conversion tables, see section “Using aconversion table” on page 141.

Syntax

.convert_name (<Expression>[,<Separator Character>[,<SeparatorPattern>],<code naming convention>])

.convert_code (<Expression>[,<Separator Character>[,<SeparatorPattern>]])

Parameters

Parameter Description

<Expression> Name or code to be converted in the correspondingconversion table

<SeparatorCharacter> (optional)

Character generated each time a separator declaredin <Separator Pattern> is found in <Expression>.For example this character can be “_”

<Separator Pattern>

(optional)Declaration of the different separators likely to existin the <Expression>. These separators will bereplaced by the <Separator Character>. You candeclare several separators, for example “/-_”

<Code namingconvention>

<firstLowerWord>: First word in lowercase, thenother first letters of other words in uppercase

<FirstUpperChar>: First character of all words inuppercase

<lower_case>: All words in lowercase and sepa-rated by an underscore

<UPPER_CASE>: All words in uppercase andseparated by an underscore

Code namingconventions

If you use the code naming convention parameter with the convert_namemacro, the conversion script will automatically convert names according tothe selected parameter. This can be very useful when you need to adaptcodes to a particular target, for example PowerBuilder naming conventions

140

Page 149: Eclipse plugin userguide

Chapter 4. Managing Models

require object codes to be always in lowercase and separated by anunderscore.

When you use a code naming convention parameter in the conversion script,the conversion table is no longer used and the name is systematicallyconverted according to the pattern defined in the code naming conventionparameter.

You can also define a code naming convention for all the instances of aselected metaclass using the resource editor, for more information on thisfeature, see section Adding a metaclass to a profile in chapter ManagingProfiles in the Advanced User Documentation .

Example You type the following script in the Name to Code page:

.convert_name(%Name%,"_","’-/’")

Note that both the <Separator Character> and the <Separator Pattern>must be defined into a double quoted string, furthermore you should addsimple quotes around <Separator Pattern> to define the pattern syntax.

In this script, the separator patterns (- and /) are used to distinguish thedifferent words in the name. The separator character ( _ ) will be used toseparate the different characters of the name. So whenever a “-” or a “/”separator pattern is encountered, it will be replaced by the “_” separatorcharacter.

The script has to convert the name CLIENT-France/Address and uses thefollowing conversion table:

Name Code

CLIENT CLI

France FR

Address ADDR

The resulting code is:

CLI_FR_ADDR

Using a conversion table

Conversion tables provide a way to define a correspondence between thename and the code of an object or the code and the name of an object.

Conversion tables are stored into separate CSV (Comma-Separated Values)files and are shared by all models.

141

Page 150: Eclipse plugin userguide

Naming Conventions

PowerDesigner provides CSV file samples stored in the ResourceFiles\Conversion tables folder of the PowerDesigner installation directory.You can also store the conversion tables you create in that directory.

Conversion tables are not case sensitive. You can indifferently uselower-or-uppercases in tables.

A conversion table encompasses a Name column and a Code column.Depending on the conversion type you use, a name or a code is returnedduring the generation. However, if several different names have the samecode for example, only the first found name is returned.

The following example illustrates a Name To Code conversion where twodifferent names (Customer and Client) have the same code (CUST):

♦ When converting the name into code, CUST will appear in the Code boxof both Client and Customer property sheet objects

♦ When converting the code into name, only the first occurrence (Customer= CUST) will be taken into account to appear in the Name box of theCustomer object property sheet

A selected conversion table will be operational only if you simultaneouslyinvoke it using the Convert_name or Convert_code macros in the Conversionscript edit box.

+ For more information on the Convert_name or Convert_code macros,see section “Using a conversion script” on page 137.

142

Page 151: Eclipse plugin userguide

Chapter 4. Managing Models

v To use a conversion table

1. Select a conversion table from the Conversion table list located in thelower part of the Name To Code or Code to Name pages.

Creating a conversion table

You create a conversion table from the list of conversion tables.

v To create a conversion table

1. Select Tools ä Resources ä Conversion Tables to display the list ofavailable conversion tables.

2. Click the New tool, enter a name and click Save to open the ConversionTable dialog.

3. Click the Add a Row tool.

4. Type a name in the Name column, and click the code into which youwant it to be converted in the Code column:

143

Page 152: Eclipse plugin userguide

Naming Conventions

You can create as many conversion pairs as required.

5. Click OK to return to the list of conversion tables, where the new table isnow available.

Modifying a conversion table

You modify a conversion table from the List of Conversion Tables.

v To modify a conversion table

1. Select Tools ä Resources ä Conversion Tables to display the list ofavailable conversion tables.

2. Select a conversion table in the list and click the Properties tool.

144

Page 153: Eclipse plugin userguide

Chapter 4. Managing Models

Note that you can also modify a conversion table directly from theNaming Convention page of the Model Options dialog box by selecting aconversion table from the Conversion Table list and clicking the Edit theselected conversion table tool.

Modifying a conversion table outside PowerDesignerAs a .CSV file, a conversion table can be modified in any externaltext editor, like Notepad for example. However, if you modify yourconversion table outside PowerDesigner while the conversion tableseditor is running in the current session, your modifications will be takeninto account only if you close and re-open the conversion tables editor.

Deleting a conversion table

You delete a conversion table from the list of conversion tables.

v To delete a conversion table

1. Select Tools ä Resources ä Conversion Tables to display the list ofavailable conversion tables.

2. Select the conversion table that you want to delete from the list and clickthe Delete tool.

Defining a code naming convention in a resource file

When you define code naming conventions in a model, these are notautomatically applied to the current model. To apply these code namingconventions, you have to do one of the following actions:

♦ Use the model to model generation feature, in this case you re-generatethe model and apply the new naming conventions

♦ Create a new model

♦ Use the Change Target Language to apply the same resource file to themodel but have the new naming conventions applied

v To define a code naming convention in a resource file

1. Open the DBMS, object language, process language, or XML languageeditor.

2. Select a metaclass in the Profile category.

3. Select a Code Naming Convention from the list.

145

Page 154: Eclipse plugin userguide

Naming Conventions

4. Click OK.

146

Page 155: Eclipse plugin userguide

Chapter 4. Managing Models

Spell CheckingSpell checking in PowerDesigner is only available if you have MS Word2000 or higher installed on your machine, and if your system code page isconsistent with the model language. For example, for the spell checker towork properly on a Chinese model, your system code page should beChinese.

Enabling the spell checker

The spell checker is a PowerDesigner add-in that needs to be enabled towork properly.

v To enable and configure the spell checker

1. Select Tools ä General Options to open the General Options dialog box.

2. Click the Add-Ins node in the Category tree view and select the SpellChecker checkbox.

3. Click OK to return to the model diagram.

4. Select Tools ä Spell Checking Options to open the Spell CheckingOptions dialog box.

5. Select the properties of model objects for which you want to check thespelling. If you select Check sub-objects, then all the child objects of anyobject you check will also be checked.

6. Select the language of your model in the Dictionary Language list, andthen click OK to return to the model diagram.

Using the spell checker

v To use the spell checker

1. Right-click an object or a model node and select Spell Check in thecontextual menu.

Spell checking starts. If an error is found the Spell Checking dialog boxopens.

2. For each error, you can:♦ Click Change to accept the suggested replacement word

♦ Type your own replacement and click Change

♦ Click Change All to apply the change to the entire object or model

147

Page 156: Eclipse plugin userguide

Spell Checking

♦ Click Add to add the word to your custom dictionaryA message is displayed to inform you that spell checking is successful.

148

Page 157: Eclipse plugin userguide

Chapter 4. Managing Models

Applying Model TransformationsTransformations are used to perform standard modifications to your modelobjects. You can apply transformations either on demand or duringgeneration.

+ For information about creating transformations, see the “ManagingProfiles” chapter in the Advanced User Documentation .

Applying transformations during generation

Transformation profiles can be used during model generation:

♦ pre-generation transformations are applied to the source model

♦ post-generation transformations are applied to the target model

Inter model generation During inter-model generation, it is impossible to execute both lists oftransformations of the same transformation profile, because the currentmodel is the source of generation but not the target as defined in thefollowing example.

Model to modelgeneration

When you generate a model to the same type of model, you can execute bothlists of transformations of the transformation profile provided you select thesame extended model definition in the source and in the target model.

149

Page 158: Eclipse plugin userguide

Applying Model Transformations

v To select transformations for generation

1. Select Tools ä Generate Model to open the Model Generation Optionsdialog box.

2. Click the Details tab, and click the Enable Transformations to display theExtended Model Definitions, Pre-generation, and Post-generation tabs.

3. Click the Extended Model Definitions tab to select the extended modeldefinitions in which you have defined your transformations.

4. Click the Pre-generation tab and select profiles and transformations to beapplied before generation. If you deselect a profile checkbox, none of itstransformations will be executed. You can drag and drop profiles tomodify transformation execution order. During generation,transformations are executed in the following order:

♦ The order of profiles in the pre and post generation pages

♦ The order of transformations in the profile itself

♦ The order in which objects are treated in the model, that is to saybeginning at the model level and recursing into sub-packages

150

Page 159: Eclipse plugin userguide

Chapter 4. Managing Models

5. Click the Post-generation tab and select profiles and transformations to beapplied after generation.

6. Click OK in the Model Generation Options dialog box.

Applying transformations on demand

Transformations can also be applied on demand in your model as a sort ofdesign pattern. You can design a pattern using the transformation feature and“play” it in your model in order to modify objects.

For example, if you are working in an OOM, you can create a transformationthat converts all analysis classes with the <<control>> stereotype intocomponents in order to add an implementation layer to your model.

Post-Generation Transformations onlyYou can only invoke post-generation transformations on demand.

There are two methods for applying transformations on demand in a model:

♦ Add a transformation as a command in a main or contextual menu (see“Defining menus in a profile” in the “Managing Profiles” chapter in theAdvanced User Documentation ).

♦ Use the Apply Transformations window available from the Tools menu.

151

Page 160: Eclipse plugin userguide

Applying Model Transformations

v To use the Apply Transformations window

1. Add one or more extended model definitions containing post-generationtransformations to your model

2. Select Tools ä Apply Transformations to open the ApplyTransformations window.

3. Select transformations profiles and transformations on theTransformations tab.

4. [optional] Click the Selection tab and deselect any objects that you wantto exclude from the transformation.

5. Click OK to apply the transformations.

152

Page 161: Eclipse plugin userguide

Chapter 4. Managing Models

Resource FilesThe PowerDesigner modeling environment is powered by resource files,which define the objects available in each model along with the methods forgenerating and reverse-engineering them. You can view, copy, and edit theseXML-format resource files in order to customize and extend the behavior ofthe environment. The following types of resource files are provided:

♦ Target languages: define the standard objects available in a model.Types of target language files include:• Process languages (.xpl) – define a specific business process language

in the BPM (see the “Process Language Reference Guide” chapter inthe Advanced User Documentation ).

• Object languages (.xol) - define a specific object-oriented language inthe OOM (see the “Object Language Reference Guide” chapter in theAdvanced User Documentation ).

• DBMSs (.xdb) - define a specific DBMS in the PDM (see the “DBMSReference Guide” chapter in the Advanced User Documentation ).

• XML languages (.xsl) - define a specific XML language definition inthe XSM (see the “XML Language Reference Guide” chapter in theAdvanced User Documentation ).

♦ Extended model definitions (.xem) – extend the standard definitions oftarget languages to, for example, specify a persistence framework orserver in an OOM. You can create or attach one or more XEMs to amodel (see the “Extended Model Definitions Reference Guide” chapter inthe Advanced User Documentation ).

♦ Report templates (.rtp) - specify the structure of a report. Editablewithin the Report Template Editor (see the Reports User’s Guide ).

♦ Report language files (.xrl) – translate the headings and other standardtext in a report (see the Reports User’s Guide ).

♦ Conversion tables (.csv) - define conversions between the name andcode of an object (see “Using a conversion table” in the “ManagingModels” chapter).

Introduction to the Resource Editor

The resource editor allows you to view and edit the resources files providedwith PowerDesigner. The left-hand pane shows a tree view of the entries

153

Page 162: Eclipse plugin userguide

Resource Files

contained within the resource file, and the right-hand pane displays theproperties of the currently-selected element:

Each entry is a part of the definition of a resource file. For example, you candefine entries for a database command, a characteristic of an objectlanguage, a report item, and so on.

Entries are organized into logical categories. For example, the Scriptcategory in a DBMS language file collects together all the entries relating todatabase generation and reverse engineering.

CautionYou should never modify the resource files shipped with PowerDesigner.To create your own resource file For each original resource file you want tomodify you should create a corresponding new resource file. To do so youhave to create a new resource file from the List of Resource Files, definea name and select the original resource file in the Copy From list. Thisallows you to create a new resource file that is identical to the original fileapart from the name.

For detailed information about resource files, see the “Resource Files and thePublic Metamodel”chapter in the Advanced User Documentation .

Opening the current target language file in the Resource Editor

When working with a BPM, PDM, OOM, or XSM, you can open the targetlanguage file that defines your modeling environment in the Resource Editorfor viewing and editing.

154

Page 163: Eclipse plugin userguide

Chapter 4. Managing Models

v To open the current target language file

1. In a BPM, select Language ä Edit Current Process Language.

2. In a PDM, select Database ä Edit Current DBMS.

3. In an OOM, select Language ä Edit Current Object Language.

4. In an XSM, select Language ä Edit Current Language.

The target language file opens in the Resource Editor.

Opening any available resource file in the Resource Editor

You can open, inspect, and edit any resource file from the lists of resourcefiles.

v To open a resource file

1. Select Tools ä Resources ä Type to open the relevant resource file list.

2. Select a file in the list, and then click the Properties tool.

The selected resource file opens in the Resource Editor.

155

Page 164: Eclipse plugin userguide

Interchanging Models using the XMI Format

Interchanging Models using the XMI FormatPowerDesigner allows you to interchange Unified Modeling Language(UML) models between different UML tool vendors using the XMLMetadata Interchange (XMI) standard file format.

XMI combines the benefits of web-based XML standard for defining,validating and sharing document formats on the Web with the benefits of theobject-oriented UML. However, the current version of XMI does not supportdiagrams interchange.

The current version of XMI is 1.1 and PowerDesigner uses the UML 1.3DTD to generate XMI files.

Importing XMI files

When you import an XMI file, you have to choose an object language andthe diagram to open (class or use case). You can then select the .XML file toimport.

The corresponding OOM is displayed in the diagram window. By default allsymbols are visible in the diagram window.

v To import an XMI file as an OOM

1. Select File ä Import ä XMI File to open the New Object-OrientedModel dialog box.

2. Select an object language from the Object Language list.

3. Select whether you want to Share or Copy the object language definition.

4. Select the type of the first diagram to open in the First Diagram list.

156

Page 165: Eclipse plugin userguide

Chapter 4. Managing Models

5. Click OK, browse to your XMI file, and click Open.

A progress box shows the progress rate of the import process.

The General page in the Modeling Output, located in the lower part of thePowerDesigner main window, shows the objects import order. At the endof the import process, the OOM corresponding to the imported XMI fileis opened in the diagram window.

Exporting XMI files

You can export your PowerDesigner OOM as an XMI file to allow it to beeasily opened in other UML modeling tools or code generators like Java,CORBA or C++. Note that only objects from the class diagram and from theuse case diagram are exported, and any symbols will be lost as only objectsare exported.

v To export XMI files

1. Select File ä Export ä XMI File.

2. Enter a filename for your XMI file and click Save.

A progress box shows the progress rate of the export process.

The General page in the Modeling Output, located in the lower part of thePowerDesigner main window, shows the objects export order. Your OOMis exported as an XMI file.

157

Page 166: Eclipse plugin userguide

Upgrading from Previous Versions of PowerDesigner

Upgrading from Previous Versions ofPowerDesigner

The resource files that customize PowerDesigner for particular targetlanguages or DBMSs are constantly evolving. When you open a modelcreated with a previous version of PowerDesigner, the resource fileassociated with the model will be automatically upgraded if possible. Notethat it may be possible to upgrade a model created with v6.x or earlier butonly upgrading from v7.x or later is supported.

Replacing a DBMS from previous versions

All DBMSs stored in the installation directory are updated when youupgrade PowerDesigner.

For DBMSs copied to the model file in previous PowerDesigner versions,you will be invited to upgrade the DBMS when you open the old model.

When you open a PDM the following situations can occur:

DBMS type Matching DBMS No match

Share DBMS upgraded and messagein the Output window

Keep DBMS from previousversion

Copy A confirmation dialog boxlets you decide if you wantto replace the DBMS, if youreplace the DBMS, a messageappears in the Modeling Outputwindow

Keep DBMS from previousversion

How to transfer DBMSchanges?

If you had customized your DBMS, you can use the following methods tokeep the changes in your definition file while switching to the currentversion:

Shared DBMS Merge the current version DBMS with DBMS from aprevious version, using the merge feature available from the list of DBMS(Tools ä Resources ä DBMS).

Copied DBMS Create a new model using a current version DBMS fairlysimilar to your modified DBMS, and merge it with a model using the DBMSfrom a previous version.

In the merge dialog box, you should have the current version DBMS in theright pane and the modified DBMS in the left pane. You should be carefulwhen you modify the current version DBMS: apply only the changes you

158

Page 167: Eclipse plugin userguide

Chapter 4. Managing Models

remember, in case of changes in both DBMS versions, try to understand thedifferences and avoid modifying the current version DBMS.

Replacing an object language from previous versions

All object languages stored in the installation directory are updated whenyou upgrade PowerDesigner.

For object languages copied to the model file in previous PowerDesignerversions, you will be invited to upgrade the object language when you openthe old model.

When you open an OOM the following situations can occur:

Shared object language If the object language file is the original filedelivered with PowerDesigner, the object language is automatically replacedas mentioned in the Output window. If the object language file is a renamedcopy of an object language shipped with PowerDesigner, a message boxappears to advise you to change object language.

Copied object language A message box appears to advise you to changeobject language. If you click Yes, the object language is automaticallyreplaced in your model. You lose all the changes performed on the definitionfile. If you click No, the object language is not replaced and remains in theprevious version format, you cannot generate for the target language. If youclick Cancel the model is not opened.

Converting genericobject language

If you had customized an object language from PowerDesigner v8.0 usingthe generic generation mechanism, the names of the templates may conflictwith the public names defined in the current version. You can use the script_PublicNames.pl located in the \Tools directory to avoid conflicts withpublic names.

159

Page 168: Eclipse plugin userguide
Page 169: Eclipse plugin userguide

CHAPTER 5

Managing Objects

About this chapter This chapter explains how to manage objects in PowerDesigner.

Contents Topic: page

Defining Objects 162

Business Rules 178

Defining Extended Objects and Links 183

Dragging, Dropping, Copying, Pasting, Moving, and Deleting Ob-jects

186

Creating a Graphical Synonym for an Object 198

Finding Objects 201

Customizing the Generation of Files for an Object 207

Using File Objects 215

Working with Extended Model Definitions 219

161

Page 170: Eclipse plugin userguide

Defining Objects

Defining ObjectsObjects the things that you model with. For example, tables, data items,generalizations, and packages are PowerDesigner objects.

There is detailed information about each object in the relevant model UserGuide. The following sections describe generic features available for allobjects.

All objects appear as nodes in the Model Explorer, and many are availablevia object lists (in the Model menu) and have a symbol that can be displayedin the diagram window.

Objects and SymbolsObjects appear in the Model Explorer. What you can see in the diagramwindows are instances of objects called symbols.

Namespaces In PowerDesigner, each package can be a namespace. It is however possibleto expand the namespace to the parent of a given package. You can cascadethe expansion until you reach the level of the model itself.

Objects that appear in the Model Explorer obey the general rules that follow:

In Model Explorer Namespace Uniqueness rule

Objects directly under a pack-age or a model (table, process,class)

Model Unique name and code inmodel

Package Unique name and code inpackage

Objects under parent object(column, attribute)

Not applica-ble

Unique name and code inparent

Linking objects (reference,relationship)

Not applica-ble

Unique name and codebetween same end objects(i.e., parallel links withsame name and code arenot allowed between sameend objects)

However, you may encounter some exceptions to those rules. For exampleonly the code of a reference allows to identify the object in the entire model,when the “Unique code” option is selected in the Model Options dialog box.PowerDesigner warns you when a general rule is not respected.

+ For more information about the management of namespace, see section

162

Page 171: Eclipse plugin userguide

Chapter 5. Managing Objects

Managing the namespace in models in chapter Managing Models.

Creating an object

You can create objects in a model or in a package in three different ways:

♦ Graphically, in the diagram window

♦ In the Model Explorer

♦ From an object list

Creating an object graphically

When objects support symbols, you can create them from the diagramwindow using the tools available in the Palette.

v To create an object graphically

1. Click an object creation tool in the Palette.

2. Click an empty space in the diagram.

The symbol of the newly created object is displayed in the diagramwindow. The corresponding node also is displayed in the Model Explorer.

3. Right-click to release the tool.

4. Double-click the symbol of the newly created object in the diagramwindow to display the object property sheet.

5. Type an object name and an object code.

6. Click OK to return to the model diagram.

Creating a link object graphically

You can create link objects from the diagram window using the toolsavailable in the Palette.

v To create a link object graphically

1. Click a link object creation tool in the Palette.

2. Click inside the source object and, while continuing to hold down themouse button, drag the cursor to the destination object. Then, release themouse button.

A link object symbol is created and displayed between the two sourceand destination objects.

163

Page 172: Eclipse plugin userguide

Defining Objects

3. Double-click the new link object symbol in the diagram to display thelink object property sheet.

4. Type a link object name and code.

5. Click OK to return to the model diagram.

Complete links The Complete Links command available from the Tools menu allows you todisplay the symbols of links existing in the model. If you select objects inthe diagram, the Complete Links command only applies to these objects.

Creating an object from the Model Explorer

You can create objects from the Model Explorer. Link objects can be createdfrom the Model Explorer only if you have previously defined the requiredsource and destination objects.

v To create an object from the Model Explorer

1. Right-click a model, package or an object category in the ModelExplorer, and select New ä object type from the contextual menu.

The object is created and its property sheet opens.

2. Type an object name and an object code.

3. [for link objects] Select a source and a destination object.

4. Click OK.

The object node is displayed under its corresponding category in theModel Explorer.

Associated symbol in diagramBy default, when you create an object from the Model Explorer, it doesnot have a symbol. You can create a symbol for the newly created objectby pressing the SHIFT key and dragging and dropping the node into thediagram window.

Creating an object in an object list

You can create an object in an object list. Link objects can be created in a listof objects only if you have previously defined the required source anddestination objects.

164

Page 173: Eclipse plugin userguide

Chapter 5. Managing Objects

v To create an object in a list of objects

1. Select Model ä object list to open the appropriate object list.

2. Click the Add a Row tool.

or

Click an empty line in the list.

or

[if the list is ordered] Click the Insert a row tool, .

A new item is added at the end of the list or before the selected row in thelist.

3. Type an object name and an object code.

4. [for link objects] Select a source and a destination object.

5. Click OK.

Associated symbol in diagramBy default, when you create an object in a list of objects, the symbol ofthe new object is displayed in the current diagram.

+ For more details about object lists, see “Lists” in the Using thePowerDesigner Interface chapter.

Object properties

You define an object with properties that appear in its property sheet.Property sheets organize object properties on tabs.

v To display an object’s property sheet

1. Double-click the object symbol or its entry in the Model Explorer.

or

Right-click the object symbol or its entry in the Model Explorer, andselect Properties from the contextual menu.

Different types of objects have different tabs, but almost all PowerDesignerobject property sheets have the following tabs:

♦ General – provides basic information about the object. Almost allobjects have the following properties:• Name - clearly identifies the object. By default names can have up to

254 characters, and can include upper, lower, and mixed case strings.

165

Page 174: Eclipse plugin userguide

Defining Objects

• Code – is a reference for the object. It is used in scripts that aregenerated from the model. By default, codes can have up to 254characters, and can include upper, lower, and mixed case strings.

• Comment – [optional] provides a more detailed description of theobject. You can display (and edit) object comments on their manydiagram symbols using the “Comment” Display Preference. Thisfeature can be useful when importing an ERwin model into a CDM orPDM.

♦ Notes – lists additional information about the object. For moreinformation, see “Attaching notes to an object” on page 166.

♦ Rules – lists the business rules that the system must follow. A businessrule could be a government-imposed law, a customer requirement, or aninternal guideline. For more information, see “Business Rules” onpage 178.

♦ Version Info - provides details about the object owner, creation, andmodification date.

♦ Dependencies - lists all the objects that depend on the object

♦ Extended dependencies - lists all the objects on which the objectdepends

Navigating between tabsUse CTRL + PAGE DOWN or CTRL + PAGE UP to move to the next or to theprevious tab and display the corresponding object type tab.

Opening property sheets at last accessed tabProperty sheets open to the General tab by default. However, you canchoose to open property sheets at the last accessed tab by selecting Toolsä General Options ä Dialog, and selecting the Keep Last Tab option in theProperty Sheets groupbox.

Attaching notes to an object

♦ The Notes tab in an object property sheet contains two sub-tabs:• Descriptions - in general, includes important information that does not

fit into the General tab. For example, a description of the Employeeentity might read: This entity has one occurrence for each employee inour worldwide operations. This base should grow by 20 percent in2002.

166

Page 175: Eclipse plugin userguide

Chapter 5. Managing Objects

• Annotations - contains notes regarding the implementation of a modelor the objects it contains. For example, an annotation of the Employeeentity might read: Verify list of attributes with Director of HumanResources.

Both are editable directly in the tab with the internal PowerDesigner RTFeditor, which includes the following tools:

Tool Description

[SHIFT + F11] Open Editor Menu.

For more information, see “Working with free text” in the ModelGraphics chapter.

[CTRL + E] Edit With. Opens your default RTF editor you previ-ously defined or allows you to select another editor if you click thedown arrow beside this tool.

+ For information about defining a default editor, see “Specifyingexternal text editors” in the Using the PowerDesigner Interfacechapter.

You can insert the content of an existing text or RTF file in the RTF editor touse it as a standard for your descriptions or annotations. This can be veryhelpful to standardize objects notes as you can have a description orannotation RTF file for each object type, and open it when needed.

v To insert a .txt or .rtf file in the RTF editor

1. Double-click an object in the diagram to display the object property sheet.

2. Click the Notes tab.

3. Click the tab (Description or Annotation) that contains the text you wantto edit.

The corresponding tab is displayed.

4. Click the Open Menu tool and select Insert from the dropdown menu.

A standard Open dialog box is displayed.

5. Browse to the directory that contains the file to open.

6. Click OK.

The content of the file is displayed in the RTF editor.

167

Page 176: Eclipse plugin userguide

Defining Objects

Object is annotatedYou can see if an object in the diagram has notes by opening the objectlist to which it belongs. If the check box corresponding to the object isselected in the N column, the object in the diagram is annotated. For moreinformation about customizing the display of a list, see “Filtering a list” inthe Using the PowerDesigner Interface chapter.

Previewing the code to be generated from an object

Many objects have a Preview tab in their property sheets, that allow you topreview the code to be generated from the object. This provides an easy wayto apply modifications to your code and update the model.

The following tools are available on this tab (though some may beunavailable for certain objects):

168

Page 177: Eclipse plugin userguide

Chapter 5. Managing Objects

Tool Description Keyboardshortcut

Open Editor Contextual Menu SHIFT + F11

Edit With contextual menu. This allows you toselect an editor for the script

CTRL + E

Refresh F5

Select generation targets. This tool is availablewhen at least one extended model definitionflagged for generation is linked to the model andwhen it contains GeneratedFiles entries for thecurrent object. When available, it displays thelist of targets for the current object. If you add ageneration target, the corresponding tab is addedto the Preview tab. If you deselect a generationtarget, the corresponding tab disappears from thePreview tab

CTRL + F6

Show generation options. If you select the ShowGeneration Options tool when available, theGeneration Options dialog box is displayed. Youcan change generation options from this dialogbox and see the impact on the code

CTRL + W

Ignore generation options. If you click the IgnoreGeneration Options tool when available, thepreview ignores generation options selected byusing the Show generation options tool but uses apredefined set of options

CTRL + D

Script bookmarks In the Preview tab, you can add and remove bookmarks at specific points inthe code and then navigate forwards or backwards from bookmark tobookmark:

169

Page 178: Eclipse plugin userguide

Defining Objects

Keyboardshortcut

Description

CTRL + F2 Adds a new bookmark. A blue bookmark box is displayed. Ifyou repeat this action from the same position, the bookmark isdeleted and the blue marker disappears. Note that bookmarksare not printable and are lost if you use the Refresh, or ShowGeneration tools.

F2 Jumps to bookmark

SHIFT + F2 Jumps to previous bookmark

+ For more information about how the Preview tab is used in the differentmodules, see the appropriate user’s guide.

v To preview the code of an object

1. Double-click an object in the diagram to display its property sheet.

2. Click the Preview tab to preview the code.

3. Click OK.

Modifying object properties

You can modify the object properties using one of the following methods:

170

Page 179: Eclipse plugin userguide

Chapter 5. Managing Objects

♦ From the object property sheet

♦ From the object type list

♦ From the object symbol in the diagram

v To modify an object’s properties from its property sheet

1. Double-click the object symbol or its entry in the Model Explorer.

or

Right-click the object symbol or its entry in the Model Explorer, andselect Properties from the contextual menu.

2. Enter changes to object properties on the various tabs.

3. Click OK to close the property sheet and return to the model diagram.

Object lists display all the objects of a given type in the current model orpackage. If you want to edit the properties of multiple objects, you can oftendo this more quickly by editing in the object list.

v To modify one or more object’s properties from an object list

1. Select Model ä Objects to display the corresponding List of Objects .

2. Select the object that you want to modify by clicking the numbered bar inthe left-hand column.

or

Click and hold as you select multiple lines.

The line(s) of the selected object(s) are highlighted.

171

Page 180: Eclipse plugin userguide

Defining Objects

3. Modify any of the properties of the object(s) directly in the list.

Display the column you needIf you do not see the column you need, display it with the CustomizeColumns and Filter tool. For details, see section Applying the cus-tomization parameters to a list in chapter Using the PowerDesignerInterface.

or

Double-click the arrow at the beginning of the line to display the objectproperty sheet. If you have selected multiple objects, the property sheetof the first will be displayed. Modify the properties as required.

4. Click OK.

You can modify an object property (like name, code, stereotype, orcardinality) directly from its symbol in the diagram without having to openits property sheet. Note that you cannot modify read-only properties orproperties that display in a list (such as table columns), in this way.

Renaming an object from its symbol in the diagramYou can rename an object from its symbol in the diagram by right-clickingthe symbol and select Edit ä Rename from the contextual menu.

You can .

v To modify properties of an object from its symbol in the diagram

1. Click an object symbol and Press F2.

or

Select an object symbol and then click it again.

or

Press CTRL while right-clicking a property name in the object symbol.

The object name, or the first object property if the name is not displayed,becomes editable.

2. Modify the property of the object in the edit zone. You can navigate tothe next or previous editable property using TAB and SHIFT+TAB

3. Click outside the edit zone to commit the change

The normal checks are performed and in case of error, the edit is lost.

172

Page 181: Eclipse plugin userguide

Chapter 5. Managing Objects

Edit in Place general optionYou can also select the Edit in place after creation option in the GeneralOption dialog box to automatically be able to modify the name of objectsfrom their symbol in the diagram, whenever you create them from thepalette. For more information about how to select the Edit-in placeoption, see section Defining the graphic tool behavior in chapter Using thePowerDesigner Interface.

Renaming an object from the Model Explorer

You can rename an object in the Model Explorer, without having to open theobject property sheet.

v To rename an object from the Model Explorer

1. Select the object node and press F2.

or

Select the object node and then click it again.

or

Right-click the object and select Rename from the contextual menu.

2. Rename the object.

Analyzing object dependencies

Objects collaborate with other objects in a variety of ways. In an object’sproperty sheet, the Dependencies tab shows the different links that existbetween the object and other objects in the model and any other models openin the project.

+ For more information about displaying object dependencies, see“Displaying object dependencies” in the Using the PowerDesigner Interfacechapter.

+ For more information about how to display the uses of an object inclosed models, see “Auditing repository activities” in the ManagingRepository Documents chapter in the Repository User’s Guide .

Using extended attributes

Extended attributes are used to complement the definition of a metaclass inorder to:

♦ Control generation for a given generation target. In this case, extendedattributes are defined in the target language or DBMS of the model. For

173

Page 182: Eclipse plugin userguide

Defining Objects

example, in the Java object language, several metaclasses have extendedattributes used for generating Javadoc comments.

♦ Further define model objects in extended model definitions. Forexample, in the extended model definition for Sybase ASA Proxy tables,the extended attribute called GenerateAsProxyServer in the DataSourcemetaclass is used to define the data source as a proxy server.

Some extended attributes are defined by default in the resource files that shipwith PowerDesigner. But you can also create additional extended attributesaccording to your needs. To do so, you have to use the profile featureavailable in the resource editor.

+ For more information about profiles in a resource files, see the“Managing Profiles” chapter in the Advanced User Documentation .

Extended attributeproperties

Each extended attribute has the following properties:

Property Description

Name Name of extended attribute.

Data type Extended attribute data type including boolean, color, date, file,float, font, etc or customized data types.

Value Value of the extended attribute. This field displays the defaultvalue defined for the extended attribute data type.

R Redefined value. This check box is selected if you modify thedefault value in the Value column, using either the down arrowor the ellipsis button.

How to define the valueof an extended attribute?

You can define the value of an extended attribute in the Value column that isdisplayed in the Extended Attributes tab of an object property sheet. Ifextended attributes are defined in a user-defined tab, it is even easier todefine their values, see “Displaying extended attributes in specific tabs” onpage 176.

174

Page 183: Eclipse plugin userguide

Chapter 5. Managing Objects

You can also display and modify extended attributes in object lists, but youneed to modify the default display of the list using the Customize Columnsand Filter tool in the list toolbar. In the following example, some javadocextended attributes are displayed in the list of interfaces.

175

Page 184: Eclipse plugin userguide

Defining Objects

v To define the values of the extended attributes of an object

1. Open the property sheet of an object.

or

Select Model ä Object to display a list of objects.

2. Click the Extended Attributes tab to display the corresponding tab.

or

Click a user-defined tab to display a user-define tab for extendedattributes.

or

Click the Customize Columns and Filter tool, select extended attributes inthe list of columns, and click OK.

3. Click the Value column of an extended attribute if you want to modify itsvalue and select a value from the list.

or

Type values directly in the boxes of the user-defined extended attributetab.

or

Type or select a value in the value cell in the list.

4. Click OK.

Displaying extended attributes in specific tabs

You can create additional tabs in a property sheet when you want to improveextended attributes presentation. By default, extended attributes are listed inthe Extended Attributes tab of an object’s property sheet. This list gathersheterogeneous attributes in alphabetical order. You can create additional tabsto better present extended attributes and make it easier to enter their values.

Additional tabs allow you to address the following problems:

♦ You have a very large list of extended attributes; you can display them indifferent property tabs with a meaningful title in order to retrieve themeasily.

♦ Extended attributes are of very heterogeneous types and need to beorganized logically instead of alphabetically.

♦ Extended attributes are related and need to be grouped together in orderto clearly indicate their dependency link.

176

Page 185: Eclipse plugin userguide

Chapter 5. Managing Objects

♦ You need to define the extended attribute value using the appropriateeditor.

To create an additional property tab you use the form extended featureavailable from the Resource Editor. You can create a “Property tab” form fora selected metaclass, stereotype or criterion and select the extendedattributes to display in this tab.

+ For more information see the “Managing Forms in a Profile” section, inthe “Managing Profiles” chapter in the Advanced User Documentation .

177

Page 186: Eclipse plugin userguide

Business Rules

Business RulesA business rule is a rule that your business follows. It is a written statementspecifying what an information system must do or how it must be structured.It could be a government-imposed law, a customer requirement, or aninternal guideline.

Business rules often start as simple observations, for example “customerscall toll-free numbers to place orders.” During the design process theydevelop into more detailed expressions, for example what information acustomer supplies when placing an order or how much a customer can spendbased on a credit limit.

You can attach business rules to your model objects to guide and documentthe creation of your model. For example, the rule “an employee belongs toonly one division” can help you graphically build the link between anemployee and a division.

Business rules complement model graphics with information that is noteasily represented graphically. For example, some rules specify physicalconcerns in the form of formulas and validation rules. These technicalexpressions do not have a graphical representation.

In the case of the PDM and OOM, you can generate business validation rulesattached to domains as check parameters.

Before you create business rules, formulate your rules by asking yourself thefollowing questions:

♦ What business problems do I want to address?

♦ Are there any procedures that my system must respect?

♦ Do any specifications dictate the scope of my project?

♦ Do any constraints limit my options?

♦ How can each of these procedures, specifications, and constraints bedescribed?

♦ How can each of these descriptions be classified? Possible classificationsare definitions, facts, formulas, requirements or validation rules

Creating a business rule

♦ You can create a business rule in any of the following ways:

♦ Select Model ä Business Rules to access the List of Classes, and clickthe Add a Row tool

178

Page 187: Eclipse plugin userguide

Chapter 5. Managing Objects

♦ Right-click the model or package in the Model Explorer, and select Newä Business Rule

♦ Open the property sheet of the object to which you want to apply the rule,click the Rules tab, and click the Create an Object tool

For general information about creating objects, see the “Getting Started withPowerDesigner” chapter.

Business rule properties

You can modify an object’s properties from its property sheet. To open abusiness rule property sheet, double-click its Model Explorer entry in theBusiness Rules folder. The following sections detail the property sheet tabsthat contain the properties most commonly entered for business rules.

The General tab contains the following properties:

Property Description

Name The name of the item which should be clear and meaningful,and should convey the item’s purpose to non-technical users

Code The technical name of the item used for generating code orscripts, which may be abbreviated, and should not generallyinclude spaces

Comment Descriptive label for the rule

179

Page 188: Eclipse plugin userguide

Business Rules

Property Description

Type Specifies the nature of the business rule. You can choosebetween:♦ Constraint – a check constraint on a value. In a PDM,

constraint business rules can be generated in the database.For example, “The start date should be inferior to the enddate of a project.”

♦ Definition – a property of the element in the system. Forexample; “A customer is a person identified by a name andan address”.

♦ Fact – a certainty in the system. For example, “A clientmay place one or more orders”.

♦ Formula – a calculation. For example, “The total order isthe sum of all the order line costs”.

♦ OCL constraint [OOM only] – An Object Constraint Lan-guage expression. See “Business rule property sheet OCLConstraint tab” on page 180.

♦ Requirement – a functional specification. For example,“The model is designed so that total losses do not exceed10% of total sales”.

♦ Validation – a constraint on a value. For example, “Thesum of all orders for a client must not be greater than thatclient’s allowance”.

Business rule property sheet Expression tab

A business rule typically starts out as a description. As you develop yourmodel and analyze your business problem, you can complete a rule byadding a technical expression. Expressions are used primarily in CDMs andPDMs.

Each business rule can include two types of expression, which you define onthe appropriate sub-tab:

♦ Server

♦ Client

Business rule property sheet OCL Constraint tab

This tab is only available for business rules with a type of OCL Constraint.The Object Constraint Language is the UML expression language. Enter

180

Page 189: Eclipse plugin userguide

Chapter 5. Managing Objects

your OCL expression in the text field.

Applying a business rule to a model object

You can apply business rules that you have created to your model objects.

v To apply a business rule to an object

1. Open the property sheet of an object, and then click the Rules tab:

2. Click the Add Rules tool to open a selection window listing all thebusiness rules available in the model:

181

Page 190: Eclipse plugin userguide

Business Rules

3. Select the business rules you want to add to the object, and then click OKto return to the object’s property sheet.

4. Click OK to close the object property sheet and return to the model.

List of Business Rules U ColumnWhen you apply a business rule to an object, its U (Used) column in theList of Business Rules is automatically checked. This column allowsyou to see what rules are unused, and delete them if necessary.

182

Page 191: Eclipse plugin userguide

Chapter 5. Managing Objects

Defining Extended Objects and LinksExtended objects and links are additional objects that can be added in anykind of model to let you design specific business needs or concepts that arenot supported by PowerDesigner standard objects.

Extended objects and links exist by default in the free model; they can alsobe added to any other model to provide greater design flexibility.

+ For more information about the free model, see “Using the Free Model”in the Managing Models chapter.

For example, you can use extended objects in a PDM to design databasespecific objects that do not exist by default in the model. These objects arenot generated or reverse engineered by default, but you can add generatedfiles in order to define extended generation. You could also use extendedobjects to design UDDI related data in an OOM.

How to use extended objects and links

Extended objects and extended links are available in all PowerDesignermodels. However, only the free model displays these objects by default. Ifyou want to use extended objects and/or links in another type of model, youhave to add the corresponding metaclasses and their tools in the currentmodel.

By default, extended objects and links do not appear in models other thanthe free model. You have to add them in the Profile category of the resourcefile attached to your model. The resource file can be an extended modeldefinition for those models that do not support languages like the CDM.

Once added, you can customize the extended objects and links usingstereotypes. You can also define extended collections for these metaclassesin order to better integrate extended objects in the semantics or your model.

+ For more information about how to customize profiles, see chapterManaging Profiles in the Advanced User documentation .

+ For more information about extended collections, see section Definingan extended collection in a profile in chapter Managing Profiles in theAdvanced User documentation .

v To add the extended object and link metaclasses to the currentmodel1. Open a resource file in the resource editor.

You may have to create and attach an extended model definition if thecurrent model is a CDM.

183

Page 192: Eclipse plugin userguide

Defining Extended Objects and Links

2. Right-click the Profile category and select Add Metaclasses in thecontextual menu.

The Metaclass Selection dialog box is displayed.

3. Click the PdCommon tab at the bottom of the dialog box to display thelist of objects common to all models.

4. Select the ExtendedLink and ExtendedObject check boxes and click OK.

The metaclasses are added to the profile. You can further define themusing stereotypes, custom tools and extended collections.

5. Click Apply in the resource editor.

Extended object properties

You can double-click any extended object symbol in the diagram to open itsproperty sheet:

Property Description

Name The name of the item which should be clear and meaningful,and should convey the item’s purpose to non-technical users

Code The technical name of the item used for generating code orscripts, which may be abbreviated, and should not generallyinclude spaces

Comment Additional information about the extended object

Stereotype Sub-classification used to extend the semantics of the extendedobject. You can create stereotypes in the Profile category of theresource file attached to the current model

Modifying the extended object display preferences

You can modify the following display preference for extended objects usingthe Tools ä Display Preferences command:

Preference Description

Stereotype Displays the stereotype of the extended object

Comment Displays the comment of the extended object

Extended link properties

An extended link is a full-featured object that can be created between anytype of object in a model.

184

Page 193: Eclipse plugin userguide

Chapter 5. Managing Objects

When you create an extended link, you have to define the followingproperties.

Property Description

Name The name of the item which should be clear and meaningful,and should convey the item’s purpose to non-technical users

Code The technical name of the item used for generating code orscripts, which may be abbreviated, and should not generallyinclude spaces

Comment Additional information about the extended object

Source Name of the extended object origin of the extended link

Destina-tion

Name of the extended object destination of the extended link

Stereotype Sub-classification used to extend the semantics of the extendedlink. You can create stereotypes in the Profile category of theresource file attached to the current model

CanLinkKind eventhandler

You can use the CanLinkKind event handler to restrict the kind andstereotype of the objects you want to link together. The CanLinkKind eventhandler has two input parameters: the source and the destination extremityof the link, note that these cannot be shortcuts.

The CanLink event handler is called when you create a link using thecorresponding tool in the Palette or when you try to modify the ends of alink from its property sheet.

+ For more information about the CanLinkKind event handler, see“Defining an Event Handler in a Profile” in the “Managing Profiles” chapterin the Advanced User Documentation .

Modifying the extended link display preferences

You can modify the following display preferences for an extended link usingthe Tools ä Display Preferences command:

Preference Description

Stereotype Displays the stereotype of the extended link

Name Displays the name of the extended link

185

Page 194: Eclipse plugin userguide

Dragging, Dropping, Copying, Pasting, Moving, and Deleting Objects

Dragging, Dropping, Copying, Pasting, Moving,and Deleting Objects

Objects in the PowerDesigner working environment are easy to manipulateand to reuse from one model or package to another.

Dragging and dropping objects

You can drag and drop objects to copy, move, create a shortcut or a replica inthe PowerDesigner modeling environment.

You can drag and drop objects from the Model Explorer, the diagram or theModeling Result List to the Model Explorer or diagram window but not tothe Modeling Result List.

By default you move an object (from one package or model to another) inthe Model Explorer by drag and drop.

You can change this behavior temporarily by pressing one or more of thefollowing keys:

Drag anddrop with. . .

Result

[no key} Move (in the Model Explorer) or paste as shortcut (betweendiagrams)

SHIFT Move

CTRL Copy

SHIFT + CTRL Shortcut creation

SHIFT + ALT Replication creation

Right-click + drag and dropIf you select an object in the Model Explorer or diagram and then right-click and drag it, when you release the right mouse button, a contextualmenu opens listing all the available drop actions.

You can modify the Model Explorer drag and drop default behavior from theGeneral Options dialog box.

v To modify the default drag and drop behavior

1. Select Tools ä General Options to open the General Options window.

2. Select a Model Explorer Drag & Drop Default action radio button .

186

Page 195: Eclipse plugin userguide

Chapter 5. Managing Objects

3. Click OK.

See also “Setting PowerDesigner General Options” in the “Using thePowerDesigner Interface” chapter.

Copying objects

You can copy objects from the following areas of the PowerDesignerinterface:

♦ The Model Explorer

♦ A diagram

♦ A list of objects

♦ The Modeling Result List

When you copy an object, you copy not only its properties but also theproperties of its related objects. For example, if you copy a CDM entity, youalso copy the attributes and business rules attached to that entity.

You can copy an object to the Clipboard in any of the following ways.

187

Page 196: Eclipse plugin userguide

Dragging, Dropping, Copying, Pasting, Moving, and Deleting Objects

v To copy a selected object to the Clipboard

1. Select Edit ä Copy from the PowerDesigner menu bar.

or

Press CTRL + C on the keyboard.

or

Right-click and select Edit ä Copy from the contextual menu of theobject.

or

Open a list of objects, select one or several lines in the list and Press CTRL

+ C on the keyboard.

Pasting objects

When you paste an object in PowerDesigner, you transfer all of its propertiesfrom the Clipboard and create a new object, and not a graphical synonym ora new instance of the copied object.

You can paste objects into the following locations:

♦ A container node (folder, model or package) in the Model Explorer

♦ A diagram

♦ A list of objects

♦ An external application

v To paste an object from the Clipboard inside PowerDesigner

1. Select Edit ä Paste from the PowerDesigner menu bar.

or

Press CTRL + V on the keyboard.

or

Right-click and select Edit ä Paste from the contextual menu of anobject.

or

Open a list of objects, select a line in the list and Press CTRL + V on thekeyboard.

Drag and drop +CTRL When you hold down the CTRL key during a drag and dropoperation, you obtain the same result as a copy/paste operation.

188

Page 197: Eclipse plugin userguide

Chapter 5. Managing Objects

If you paste the selected object into an external application, the followingwill occur::

Copied item Paste result

Diagram symbol Image of the symbol (MS Word, PaintBrush)

List item from an object list List in CSV format (MS Word, Excel)

Item from the Check Model-ing Result List

List in CSV format (Excel)

Item from the Find ModelingResult List

List in CSV format (Excel)

Pasting a shortcut

You can copy a shortcut and paste it in another model or package, the resultis a shortcut with the same properties as the original shortcut.

You can use the drag and drop feature for shortcut creation by:

♦ Pressing the SHIFT and CTRL keys

♦ Selecting the Create shortcut option as the default drag and drop behavior

+ For more information about selecting, shortcut creation as the defaultdrag and drop behavior see “Dragging and dropping objects” on page 186.

You can paste a shortcut into the following PowerDesigner targets:

♦ The Model Explorer

♦ A diagram

+ For more information about shortcuts, see the Managing Shortcutschapter.

Pasting in a diagram When you paste a shortcut into a diagram the result is the following:

189

Page 198: Eclipse plugin userguide

Dragging, Dropping, Copying, Pasting, Moving, and Deleting Objects

Shortcut source Paste result

Same model or packageSame diagram

New graphical synonym of shortcut No objectcreation

Same model or packageDifferent diagram

New shortcut symbol or graphical synonymNo object creation

Different model or package If the shortcut does not exist, a shortcut withits symbol are created

If the shortcut already exists without a symbol,symbol is created

If a shortcut and a symbol already exist, agraphical synonym is created

+ For more information about synonyms, see section “Creating aGraphical Synonym for an Object” on page 198.

v To paste a shortcut

1. Select Edit ä Paste.

Disabled pasteYou cannot paste a shortcut in a model or a package where the sameshortcut already exists.

Pasting an object as a shortcut

When you copy an object you can also paste it as a shortcut in a referencingmodel or package.

+ For more information about shortcuts, see the Managing Shortcutschapter.

You can paste an object as a shortcut into:

♦ The Model Explorer

♦ A diagram

The paste as shortcut feature works according to the following rules:

190

Page 199: Eclipse plugin userguide

Chapter 5. Managing Objects

Paste destination If a shortcut already exists If a shortcut doesnot exist

Model Explorer

List of objects

Nothing happens Shortcut created

Same model or packagebut different diagram

Nothing happens Nothing happens

Same model or packageand same diagram

Nothing happens Nothing happens

Different model or pack-age

Symbol created if there wasno symbol

Graphical synonym createdif symbol already existed

Shortcut + symbolcreated

v To paste an object as a shortcut

1. Select Edit ä Paste As Shortcut.

or

Right-click the Model Explorer target or the diagram window and selectEdit ä Paste As Shortcut from the contextual menu.

Drag and drop +CTRL+SHIFT When you hold down the CTRL AND SHIFT keys during adrag and drop operation, you obtain the same result as a paste as shortcutoperation.

Managing paste conflicts

When you paste an object in PowerDesigner, checks are applied in order toverify that no conflict occurs between the identifying properties of theobjects. The identifying criteria depends on the type of object, for someobjects the identifying property is just the code, for other objects, identifyingproperties are the name and the code.

+ For more information about the identifying properties of an object, see“Defining Objects” on page 162.

When a paste conflict occurs, PowerDesigner automatically renames thename and/or the code of the object in the following way:

191

Page 200: Eclipse plugin userguide

Dragging, Dropping, Copying, Pasting, Moving, and Deleting Objects

Source object First renaming Second renaming

Name Name2 Name3

CODE CODE2 CODE3

A message is displayed in the Output pane to warn you that the object wasrenamed.

Renaming an entity When a paste conflict occurs on a CDM entity, the entity is renamedaccording to the data item options set in the model.

Data item options Result of copying an entity

Unique Code

Allow Reuse

New entity with new name and code

New identifier with new name and code

Reuses other attributes

Unique Code only New entity with new name and code

New identifier with new name and code

New attributes with new names and codes

Allow Reuse only New entity with new name and code

New identifier with same name and code

Reuses other attributes

None New entity with new name and code

New identifier with same name and code

New attributes with same names and codes

Deleting objects

You can delete an object from the Model Explorer, a diagram, or an objectlist. You can choose to

♦ Delete the object (including any sub-objects) from the model. Forexample, when you delete a table from a PDM, you delete its columns,keys, triggers and indexes.

♦ Delete the symbol from the diagram, but keep the object in the model

If you delete an object that is connected to another object via a link object,you will also delete the link object.

192

Page 201: Eclipse plugin userguide

Chapter 5. Managing Objects

Deleting domains and data items in a CDM or PDMIf you have specified that domains and data items can be reused by multipleobjects in a CDM or PDM and you delete a parent object to which theybelong, these sub-objects will not be deleted with their parent. For moreinformation, see the Conceptual Data Model and Physical Data ModelUser’s Guides.

v To delete an object from the Model Explorer

1. Select the object node in the Model Explorer and press the DEL key.

or

Right-click the object node in the Model Explorer and select Edit ä

Delete from the contextual menu.

The Confirmation dialog box is displayed.

2. [optional] Click the Impact button to evaluate the impact of the deletion(see the Impact Analysis chapter).

3. Click OK.

The object, its symbol, and any sub-objects are deleted from the model.

v To delete an object from the diagram window

1. Select the object symbol in the diagram and press the DEL key.

or

Right-click the object symbol in the diagram and select Edit ä Deletefrom the contextual menu.

The Confirm Deletion dialog box is displayed. Note that if you delete afree symbol, such as free text, a line or a shape, no confirmation isrequired.

193

Page 202: Eclipse plugin userguide

Dragging, Dropping, Copying, Pasting, Moving, and Deleting Objects

2. [optional] Click the Impact button to evaluate the impact of the deletion(see the Impact Analysis chapter).

3. Choose one of the following delete options:♦ Delete objects – deletes the object, with all its properties and

sub-objects from the model

♦ Delete symbols only – deletes the object symbol from the diagram, butleaves the object available in the model for future use

4. Click OK.

The object (or only its symbol) is deleted from the model.

v To delete an object from a list

1. Select Model ä Object to display a list of objects.

2. Select one or more items in the list and then click the Delete button.

No confirmation dialog box opens. The object is deleted directed fromthe model.

3. Click OK to close the list and return to the model diagram.

Undo deletionYou can select Edit ä Undo to undo the deletion. You can restore thesymbol in the diagram, by selecting Symbol ä Show Symbols and selectingthe object’s check box in the Show Symbols dialog box.

Suppressing the delete confirmation dialog box

By default, you are required to confirm any deletion of an object. You cansuppress these confirmation messages.

194

Page 203: Eclipse plugin userguide

Chapter 5. Managing Objects

v To suppress the confirmation of object deletions

1. Select Tools ä General Options to open the General Options dialog box .

2. Clear the Confirm Object Deletion check box.

3. Click OK to return to the model diagram.

Moving Objects from Package to Package

You can move an object from package to package using drag and dropfeature.

Moving objects is different from cutting and pasting items, since you do notduplicate objects.

For entities containing data items, the following situations can occur whenyou move the entity:

Data items Namespace Move result

Only used by selected en-tity

Move within thesame namespace

The data items are movedwith the entity

Reused among differententities

Move within thesame namespace

Shortcuts of data itemsare created for reused dataitems

Used only by one entityor reused among differententities

Change names-pace

Data items are copied inthe other namespace

195

Page 204: Eclipse plugin userguide

Dragging, Dropping, Copying, Pasting, Moving, and Deleting Objects

+ For more information about shortcut and copy rules see section Creatinga shortcut in chapter Managing shortcuts.

Moving objects is restricted as follows:

♦ Models must be compatible (same resource file)

♦ Global objects (business rule, domain, storage etc.) cannot be moved intoa sub-package

When you move an object from a package to another, linking objects thatyou move keep their links in the target package and a shortcut is usuallycreated in the source package. The general rule being that conceptualmodeling must be preserved.

Shortcuts creation rules in PowerDesigner also apply to moving objectsbetween packages.

+ For more information about shortcuts creation, see chapter Managingshortcuts.

Moving an object with anon-oriented link

Source package Moving result

In the source package, ashortcut of the moved entity is

created:

In the target pack-age, the moved entity is

displayed:

Moving an object with anoriented link

196

Page 205: Eclipse plugin userguide

Chapter 5. Managing Objects

Source package Moving result

Example 1: Move TABLE_2

In the source package, a shortcutof the parent table (TABLE_2) is

created:

In the target package, theparent table (TABLE_2) is

displayed:

Example 2: Move TABLE_1

In the source package, onlythe parent table (TABLE_2) is

displayed:

In the target package, thechild table (TABLE_1) is dis-played with the reference link and ashortcut is created for the parent table

(TABLE_2):

v To move an object from a package to another

1. Select an object.

2. Press SHIFT while dragging the object to the target package.

The object is moved to the new destination and a shortcut is created eitherin the source package or in the destination package depending on the linktype.

197

Page 206: Eclipse plugin userguide

Creating a Graphical Synonym for an Object

Creating a Graphical Synonym for an ObjectA graphical synonym is an additional symbol for an object. It has no specificdefinition in itself but takes the one of the object it represents.

By reproducing the same object at different places in the diagram, graphicalsynonyms can improve the readability of the diagram as links becomeshorter.

You can create as many graphical synonyms as you want within the samediagram.

You can create graphical synonyms of graphical synonyms as they aregraphical representations of the same object. You can also create graphicalsynonyms of object shortcuts.

In the diagram, the graphical synonym displays the name of the objectfollowed by a colon and the number of the occurrence.

This class is a graphical synonym for the class Printer.

Moving graphicalsynonyms

A graphical synonym exists in a diagram as long as the object it representsalso exists.

If you move a graphical synonym from a package to another, it is moved tothe target package and shortcuts are created for the remaining graphicalsynonyms in the source package.

Link object graphicalsynonym

When you create a graphical synonym for a link object, you automaticallycreate one for its extremities, provided they also support graphicalsynonyms. If not, the creation of the graphical synonym for the link objectwill fail.

The following object symbols do not support graphical synonyms:

Model Object symbol

CDM Inheritance

OOM Swimlane, synchronization, decision

BPM Swimlane, synchronization, decision

You cannot graphically distinguish a link object graphical synonym from asimple link object, unless you display the name attribute in the diagramusing the Display Preferences dialog box. However, when you select a link

198

Page 207: Eclipse plugin userguide

Chapter 5. Managing Objects

object in the diagram, the text (Graphical Synonym) is displayed in thetooltip for the object link.

In the following example, the creation of the graphical synonym for thisreference has forced the creation of a graphical synonym for its extremities(tables). The tooltip shows that the reference is a graphical synonym.

If you delete a link object graphical synonym, only the symbol is deletedwithout asking any confirmation.

The following link objects do not support graphical synonyms:

Model Link object

CDM Inheritance link

OOM Transition (Activity and Statechart diagrams) Instance Link (Col-laboration and Object diagrams) Messages (Sequence and collabo-ration diagrams) Association class link (class diagram) InteractionFrame, Fragment, and Reference (Sequence)

BPM Flow

All Free symbol Line

199

Page 208: Eclipse plugin userguide

Creating a Graphical Synonym for an Object

v To create a graphical synonym for an object

1. Right-click an object in the diagram.

2. Select Edit ä Create Graphical Synonym from the contextual menu.

The graphical synonym is displayed in the diagram window.

Navigating between graphical synonyms in a diagramYou can find a particular graphical synonym in a diagram by right-clickinga graphical synonym in the diagram window and select Edit ä FindGraphical Synonym from the contextual menu, then select a graphicalsynonym from the list. The graphical synonym is centered and selected inthe diagram window.

200

Page 209: Eclipse plugin userguide

Chapter 5. Managing Objects

Finding ObjectsPowerDesigner lets you search for objects within all the models currentlyopen in your project in order for you to:

♦ Locate objects in the different models in the project and modify theirproperties

♦ Find all the shortcuts related to a given object

♦ Reuse objects from one model to another

v To find an object

1. Select Edit ä Find Objects to open the Find Objects dialog box.

2. Specify the appropriate parameters on the Name and Location, User andDate, and Advanced tabs. For more information, see “Find objectparameters” on page 201.

3. Click the Find Now button.

Find process messages are displayed in the Output pane in the lower partof the PowerDesigner window.

Stopping the Find Objects processOnce you have started the Find Objects process, you can stop it at anytime by clicking the Stop button in the Find Object dialog box.

The Find Object dialog box remains open until the end of the process,then it is closed and the Modeling Result List displays the result.

Find object parameters

You can define very precise parameters in the Find Objects dialog box:

♦ The name and location of PowerDesigner objects.

201

Page 210: Eclipse plugin userguide

Finding Objects

♦ Advanced find criteria on the properties of PowerDesigner objects.

♦ The creation or modification date of PowerDesigner objects.

Name and Locationparameters

The following parameters are available on this tab

Parameter Description

Look in Specifies the scope of the search. You can select the entireproject, a folder, a model, or a package within a model. Youmay need to navigate up or down the dynamic list in order tomake all possibilities available.

Model type Specifies the type of PowerDesigner model to be searched.The options available in this list are affected by your choicein the Look in field.

Object type Specifies the type of model objects to be searched. Theoptions available in this list are affected by your choice in theModel type field.

Includeshortcuts

Specifies that object shortcuts that correspond to your criteriawill be searched.

202

Page 211: Eclipse plugin userguide

Chapter 5. Managing Objects

Parameter Description

Name Specifies the object name to search for. You can use thefollowing special characters:♦ * - none to any number of characters

♦ ? – exactly one character

♦ \* - * is a normal character

♦ \? - ? is a normal character

♦ \\- \is a normal character

♦ true/false - Boolean value (True is when the check box isselected in the interface)

For example:

W* finds “Work” and “Washington”

*IST finds “List” and “Specialist”

*96 finds “01/11/96” and “26/08/96”

????ER finds “Writer” and “Seller” but not “inner”

COLN? finds “COLN1” and “COLN2”

*_emp_??? finds “Div_emp_fun” and “Div_emp_idn”

Code Code of the object. You can type the exact code of the objector use a string expression

Case sensi-tive

If you select this check box, you will find objects with casematching with the Name and Code expressions

User and Dateparameters

The following parameters are available on this tab

203

Page 212: Eclipse plugin userguide

Finding Objects

Parameter Description

Createdcheck box

Select this check box if you want to define creation parameters

Created by Name of the user who created the object

Date Creation date criteria, you can search:♦ Before a given date

♦ After a given date

♦ Between two dates

♦ During a period of time

Modifiedcheck box

Select this check box if you want to define modificationparameters

Modified by Name of the user who made the last modification to the object

Date Modification date criteria, you can search:♦ Before a given date

♦ After a given date

♦ Between two dates

♦ During a period of time

Advanced parameters When you select an object type, the Advanced tab allows you to specifyadvanced find parameters on each property of the selected object type. Thisadvanced search feature also supports the use of wildcards and stringexpressions.

204

Page 213: Eclipse plugin userguide

Chapter 5. Managing Objects

The following parameters are available on this tab: Note that if you do notselect an object type, you define advanced Find parameters only on the nameand code properties. These properties being common to all types of objects.

Find criteria Description

U column (Ufor Used)

When selected, implies that the property will be taken intoaccount during the Find process

Expression Allows you to define a string expression that will become afind criteria on the selected property

Selected property with no expression definedIf you select the Used check box for a property without any expression, itis equivalent to a null value, the find process will consequently look forobjects which selected property is null.

Using the Modeling Result List

From the Modeling Result List, you can:

♦ Copy an object and paste it as a new object or a shortcut

♦ Find an object in the Model Explorer

♦ Find an object’s symbol in one or more diagrams

♦ Modify the properties of an object

205

Page 214: Eclipse plugin userguide

Finding Objects

v To copy an object from the Modeling Result List

1. Right-click the object in the Modeling Result List and select Copy fromthe contextual menu.

2. Select the appropriate destination in the Model Explorer or diagramwindow and select Edit ä Paste or Edit ä Paste as Shortcut from thecontextual menu

v To find an object from the Modeling Result List in the Model Ex-plorer

1. Right-click the object in the Modeling Result List and select Find inModel Explorer from the contextual menu.

The object is highlighted in the Model Explorer

Objects identificationThe Location column also allows you to know where objects have beendefined.

v To find the symbol(s) of object from the Modeling Result List

1. Right-click the object in the Modeling Result List and select Find inDiagram from the contextual menu.

The appropriate diagram is opened and the symbol centered in thewindow

or

When an object has several symbols within a model, a symbol selectiondialog box is displayed that lets you select an object symbol among allinstances of the object within the model diagrams.

Object without symbolsIf you select an object that does not have an associated symbol in thediagram, a warning message is displayed.

v To modify object properties from the Modeling Result List

1. Right-click the object in the Modeling Result List and select Propertiesfrom the contextual menu.

The object’s property sheet opens.

2. Make any appropriate changes and then click OK

206

Page 215: Eclipse plugin userguide

Chapter 5. Managing Objects

Customizing the Generation of Files for an ObjectIn PowerDesigner, you can define a generated file on a selected metaclass(or stereotype or criterion), in this case a file is generated for each instanceof the metaclass existing in your model. The generated files mechanism isdefined in “Defining Templates and Generated Files in a Profile” in the“Managing Profiles” chapter in the Advanced User Guide .

You can modify the default generation of files using artifacts. Artifacts areused to generate files only for selected instances of a metaclass in order to:

♦ Design a source file that includes the code of several objects in a singlefile.

♦ Generate only for selected instances of a metaclass.

♦ Customize the generated file name and path.

C# and VB .NET reverseengineering use case

Artifacts are visible in the C# and VB .NET object languages. This is tosupport round-trip engineering for these languages: when you reverseengineer C# or VB .NET code, each source file in the source code becomesan artifact in PowerDesigner. The artifact allows you to re-generate the samecollection of objects while preserving file structure.

Using artifacts in a model

To be able to use an artifact in a model, you have to declare it in a resourcefile attached to your model. To declare an artifact you have to create atemplate called “DefaultTemplate” under an artifact stereotype or criterionbearing the name of the corresponding file type to generate.

In the C# resource file, if you expand the Artifact folder, you can see that thestereotype “Source” and the template “DefaultTemplate” are defined bydefault. This means that when you create a new artifact and assign theSource stereotype, this artifact inherits the default template defined below:

207

Page 216: Eclipse plugin userguide

Customizing the Generation of Files for an Object

Example You define the following artifact criterion in an extended model definition:

This criterion verifies that the last 4 characters of the artifact name are .TXT.You also need to create the default template in order to define the content ofthe generated file. In this example, DefaultTemplate is defined as follows:

208

Page 217: Eclipse plugin userguide

Chapter 5. Managing Objects

This is a text file.

.foreach_item(ProductionObjects)%ShortDescription%.next(\n)

You can now create artifacts in the model using the New ä Artifactcommand in the model contextual menu. If you create an artifact with the.TXT extension and select the correct target in the Template tab of theartifact property sheet, the default template is automatically assigned to thisartifact. This means that the short description of each instance of objectassociated with the current artifact will be written in the generated file:

You can now define instances of objects you want to include in the filegenerated from the current artifact:

209

Page 218: Eclipse plugin userguide

Customizing the Generation of Files for an Object

Defining an artifact

Artifacts can replace the standard generation of files; by default, an artifactgenerates the same code as the generated file but only for selected instancesof a metaclass.

An artifact has the following properties:

Property Description

Name Name of the artifact.

Comment Descriptive comment for the artifact.

Stereo-type

Sub-classification used to extend the semantics of an objectwithout changing its structure; it can be predefined or user-defined.

Encoding Allows you to modify the default file encoding of the files toreverse engineer.

An artifact definition also includes the following properties:

210

Page 219: Eclipse plugin userguide

Chapter 5. Managing Objects

Property Description

Template Template used to generate the content of the generated file.

Objects List of objects associated with the current artifact.

Prerequisites List of artifacts that must be generated before the currentartifact.

Preview Allows to visualize the generated code of the artifact.

v To define an artifact

1. Double-click the symbol of an object with generated files, for example aclass in C# language.

2. Click the Generated Files tab.

The Target column displays the resource file where the generated file isdefined and the File Type column displays the type of the generated file.

Each row in the list corresponds to a generated file type available for thecurrent instance of a metaclass, you can customize the generation of thisfile using an artifact.

3. Click the Create tool in the Artifact(s) column to add an artifact. Thisartifact will replace the standard file generation for the current object.

4. Click Apply and click the Properties tool to define artifact properties.

211

Page 220: Eclipse plugin userguide

Customizing the Generation of Files for an Object

5. Click OK in both property sheets.

Managing artifacts

Artifacts appear in the Artifact category of the Model Explorer. You canperform the following actions to customize an artifact:

♦ Change the artifact name using the Edit in place feature and avoidopening the artifact property sheet

♦ Drag and drop authorized objects from the diagram or the Model Explorerto an artifact in order to add the code of this instance to the artifact

Artifact folder An Artifact folder is used to create an artifact hierarchy for generation.

You can create as many folders as you need using the New ä Artifact Foldercommand in the Artifact category or model contextual menu. The artifactfolder property sheet is displayed to let you define a name and comment forthe folder. You can then create artifacts in the folder structure.

Generated files tab

In the Generation dialog box, the Generated Files tab displays a checkboxtree with generated files (with a dimmed icon) and artifacts. You can selector deselect the files you want to generate.

212

Page 221: Eclipse plugin userguide

Chapter 5. Managing Objects

You can modify generation options from this dialog box, and you can alsocheck artifact generation completeness: if an exclamation mark is displayedon the artifact icon it means that one or several prerequisite artifacts aremissing.

If you click the Enforce Dependencies tool in the upper part of the dialogbox, the artifacts that are prerequisites of other artifacts are automaticallyselected in the tree view in order to properly generate artifacts.

Generate from an artifactfolder

If you click the Generate command in the artifact folder contextual menu, aGeneration dialog box is displayed to let you manage the generation of agiven artifact folder. This dialog box also displays a checkbox tree withchildren artifacts of the selected artifact folder.

213

Page 222: Eclipse plugin userguide

Customizing the Generation of Files for an Object

You can enforce dependencies in the Generation dialog box to make sure allprerequisites are selected for generation.

214

Page 223: Eclipse plugin userguide

Chapter 5. Managing Objects

Using File ObjectsA file object is a graphical representation of a Windows supported file (forexample, a Java file, script SQL, or MS Word file). The file object can beexternal to the model or embedded in it.

You can use a file object for different purposes in PowerDesigner. Forexample you can:

♦ Attach a file object to a PowerDesigner object to enrich its description

♦ Attach a generated OOM class to a target Java file

Creating a file object

You can create a file object in any of the following ways:

♦ Use the File tool in the diagram Palette.

♦ Select Model ä Files to access the List of Files, and click the Add a Rowtool.

♦ Right-click the model or package in the Model Explorer, and select Newä File from the contextual menu.

♦ Drag a file from Windows Explorer and drop it in the diagram or ModelExplorer.

For general information about creating objects, see “Creating an object” onpage 163.

File object properties

You can modify an object’s properties from its property sheet. To open a fileobject property sheet, double-click its diagram symbol or its Model Explorerentry in the Files folder. The General tab contains the following properties:

Property Description

Name The name of the item which should be clear and meaningful,and should convey the item’s purpose to non-technical users

Code The technical name of the item used for generating code orscripts, which may be abbreviated, and should not generallyinclude spaces

Comment Descriptive label for the file object

215

Page 224: Eclipse plugin userguide

Using File Objects

Property Description

Stereo-type

Sub-classification used to extend the semantics of the file object.You can create stereotypes in the Profile category of the resourcefile attached to the current model.

Locationtype

Specifies the nature of the file object. You can choose from thefollowing options:♦ Embedded – the file is stored within the model and is saved

when you save the model.

♦ External – the file is stored in the Windows file system, andyou must enter its path in the Location field.

♦ URL – the file is on the web and you must enter its URL inthe Location field

If you subsequently change the type:♦ From external to embedded – you will be prompted to import

the contents of the file into the model

♦ From embedded to external – you will be warned that theexisting contents will be lost.

Location [External and URL types only] Path or URL to the file.

Extension Extension of the file object name that indicates the applicationto open when the file object is embedded

Generate File object is automatically included among the objects gener-ated from the model when you launch the inter-model generationprocess

Artifact Specifies that the file object is not a piece of documentation, butrather forms an integral part of the application.

If an artifact has an extension that is defined in the Editorspage in the General Options dialog box and is linked to the<internal> editor (see “Specifying text editors” in the Using thePowerDesigner Interface chapter), a Contents tab is displayedin the artifact property sheet. The Contents tab allows youto edit the artifact file directly in the internal text editor ofPowerDesigner.

For more information about the use of artifact files, see “Files”in the Building Physical Diagrams chapter of the OOM User’sGuide .

216

Page 225: Eclipse plugin userguide

Chapter 5. Managing Objects

Opening and editing file objects

When you work with an embedded object file, the content of the file is storedinto a temporary file while the associated application opens. Each time yousave your file in the associated application, its content is automaticallycopied from the temporary file into your PowerDesigner model. If yourename your file in the associated application, PowerDesigner will not beable to recognize your file and its content will not be copied into your model.

v To open a file object

1. Double-click the file object node in the Model Explorer, its symbol in thediagram, or its entry in the List of Files.

The application associated with the file object extension opens. If the fileobject extension has no association in Windows, a standard Open Withdialog box opens that lets you select the application you want to open thefile object.

A newly created file object has, by default, a .txt extension and opens inNotepad. You can change the extension in the file object property sheet andassociate other editors with the extension.

v To select an application program for a file object

1. Right-click a file object and select ä Open With ä Choose Program fromthe contextual menu.

2. Browse to the directory that contains the program file you want, select it,and click Open.

The file object automatically opens in the associated application program.

+ For more information about text editors, see “Specifying a text editor” inthe Using the PowerDesigner Interface chapter.

Attaching a file object to a PowerDesigner object

You can attach a file object to another object in any of the following ways:

♦ Right-click an object symbol in the diagram and select File ä Add Filefrom the contextual menu.

♦ Use the Link/Extended Dependency tool in the diagram palette to draw alink from the object symbol to the file object symbol.

♦ Open the property sheet of the object, click the Extended Dependenciestab, and select the file object using the Add Objects tool..

217

Page 226: Eclipse plugin userguide

Using File Objects

The connection between the object and the file object takes the form of anextended dependency, and is visible:

♦ Graphically in the diagram

♦ On the Dependencies tab of the file object property sheet and on theExtended Dependencies tab of the dependent object property sheet

♦ Under the File menu item in the contextual menu of the dependent objectsymbol.

+ For more information about extended dependencies, see “Displayingobject dependencies” in the Using the PowerDesigner Interface chapter.

Modifying the file object display preferences

You can modify the following display preference for a file object using theTools ä Display Preferences command:

Preference Description

Location Displays the location of the file object

218

Page 227: Eclipse plugin userguide

Chapter 5. Managing Objects

Working with Extended Model DefinitionsExtended model definitions provide means for customizing and extendingPowerDesigner metaclasses, parameters and generation. You use extendedmodel definitions to:

♦ Extend the PowerDesigner metamodel and develop the definition ofmetaclasses using profiles

♦ Complement the generation targets and commands of an object language

♦ Generate for an extended model definition

+ For more information about extended model definitions, see chapterExtended Model Definitions Reference Guide in the Advanced Userdocumentation .

What is an extendedmodel definition?

An extended model definition is made up of a number of categories. Acategory can contain other categories, entries, and values. These entries areparameters recognizable by PowerDesigner.

The values for extended model definition categories and entries vary foreach extended model definition. Some entries may not exist in the extendedmodel definition file if they are not applicable to the particular extendedmodel definition.

How to use extendedmodel definitions?

You can create generic and specific extended model definitions.

♦ A generic extended model definition is a library of metamodel extensionsand generation parameters saved in a file with the .XEM extension. Thisfile is stored in a central area and can be referenced by models toguarantee data consistency and save time to the user

♦ A specific extended model definition is embedded into a model anddevelops object definitions and generation parameters in this particularmodel

Creating an extended model definition

When you create a new extended model definition you can choose to:

♦ Create a generic extended model definition file to reuse between models

♦ Create a specific extended model definition for the needs of a given model

The creation procedure differs according to the type of extended modeldefinition you want to create.

219

Page 228: Eclipse plugin userguide

Working with Extended Model Definitions

Creating a generic extended model definition

You can create generic extended model definitions to share informationbetween models of the same type.

v To create a generic extended model definition

1. Open a model.

2. Select Tools ä Resources ä Extended Model Definitions ä Model type.

The List of Extended Model Definitions is displayed.

3. Click the New tool to display the New Extended Model Definitionwindow.

4. Type a name for the new extended model definition in the Name box.

5. <optional> Select a model template from the Copy From box. The list isempty if you create the first extended model definition.

6. Click OK.

A standard Save As dialog box is displayed.

7. Type a name.

Changing pathIf you change the default path, extended model definitions do not appearin the list of extended model definitions. If you want to save yourextended model definitions in a specific folder, you have to definea specific named path in the General Options dialog box. For moreinformation about named path, see section Defining named paths inchapter Using the PowerDesigner Interface.

8. Click Save.

The Extended Model Definition Properties dialog box is displayed. TheGeneral tab displays all objects of the extended model definition togetherwith an editor of extended model definitions on the right side of the treeview.

220

Page 229: Eclipse plugin userguide

Chapter 5. Managing Objects

9. Define the extended model definition.

+ For more information, see chapter Managing Profiles in theAdvanced User documentation .

10. Click OK.

The List of Extended Model Definitions displays the new extended modeldefinition, whose name is followed by a star symbol to designate the stateof an extended model definition to be saved. The first time you save yourextended model definition, the symbol is no longer displayed.

11. Click Close.

221

Page 230: Eclipse plugin userguide

Working with Extended Model Definitions

A confirmation box prompts you to save the changes made to theextended model definition, click Yes. The extended model definition issaved in a file with the .XEM extension.

Importing an extended model definition fileIf you want to integrate a generic extended model definition into amodel, you can import an extended model definition file.

+ For more information about importing extended model definitions,see section “Selecting extended model definitions” on page 224.

Creating a specific extended model definition for a model

You can create an extended model definition for a specific model, in thiscase, it has the same type as the current model.

v To create a specific extended model definition for a model

1. Open a model.

2. Select Model ä Extended Model Definitions to display the List ofExtended Model Definitions.

3. Click the Add a Row tool to create a new extended model definition.

4. Type a name for the extended model definition.

5. Click the Properties tool to display the property sheet of the extendedmodel definition.

You are asked to commit the creation of the extended model definition.

6. Click Yes.

The Extended Model Definition Properties dialog box is displayed.

222

Page 231: Eclipse plugin userguide

Chapter 5. Managing Objects

7. Define the extended model definition.

+ For more information, see chapter Managing Profiles in theAdvanced User documentation .

8. Click OK.

You return to the List of Extended Model Definitions.

9. Click OK.

Exporting an extended model definitionIf you want to share an extended model definition created for a modelwith other models, you can export this extended model definition inorder to reuse it with other models.

+ For more information about exporting extended model definitions,see section “Exporting an extended model definition” on page 225.

Missing extended model definition

When you import a shared extended model definition in a model, you createa link between the model and the extended model definition file. If yourename, move or delete the extended model definition file associated withthe model, you break this link.

The following dialog box is displayed when you open a model linked to ashared extended model definition file that is missing from the directorywhere it was created:

223

Page 232: Eclipse plugin userguide

Working with Extended Model Definitions

The Missing Extended Model Definitions dialog box displays the name andpath of the missing(s) extended model definition(s).

You can use the following tools:

Tool Description

Opens a standard Open dialog box in which you can browse andselect the missing extended model definition. When you select thecorrect path and file, the extended model definition disappears fromthe list

Deletes the link between the model and the shared extended modeldefinition. The missing extended model definition disappears fromthe list

Selecting extended model definitions

Extended model definitions (.XEM files) provide means for customizing andextending PowerDesigner metaclasses, parameters and generation. Extendedmodel definitions are typed like models in PowerDesigner. You create anextended model definition for a specific type of model and you cannot sharethese files between heterogeneous models.

When you create a new model, or when you reverse engineer into a newmodel, you can select one or several extended model definitions and attachthem to the model from the New Model dialog box.

You can also import a generic extended model definition file into yourcurrent model. When you import an existing extended model definition, you

224

Page 233: Eclipse plugin userguide

Chapter 5. Managing Objects

reuse the extended attributes and stereotypes defined in a library available onyour machine.

Naming conventionsWhen you import an extended model definition and copy it into a model,the name and code of the extended model definition may be modified inorder to respect the naming conventions of the Other Objects category inthe Model Options dialog box.

You can choose one of the following options:

Option Definition

Share Current extended model definition constantly refers to the ex-tended model definition stored in the Resource Files\ExtendedModel Definitions directory. Any changes made to the extendedmodel definition are shared by all linked XEM

Copy Current extended model definition is a unique copy of the ex-tended model definition stored in the Resource Files\ExtendedModel Definitions directory. The current extended model defi-nition is independent of the original one, so modifications madeto the extended model definition in the Resource Files\ExtendedModel Definitions directory are not available to the copied XEM.This one is saved with the model and cannot be used without it

+ For more information about extended model definitions, see chapterExtended Model Definitions Reference Guide, in the Advanced UserDocumentation.

Exporting an extended model definition

You can export an extended model definition created in a model if you wishto share this definition with other models. Export allows you to create aXEM file that will be stored into your extended model definition librarydirectory. When you export an extended model definition, the specificextended model definition remains embedded in the model.

An extended model definition created in a model does not appear in the Listof Extended Model Definitions. Whereas an exported extended modeldefinition is displayed in the List of Extended Model Definitions.

225

Page 234: Eclipse plugin userguide

Working with Extended Model Definitions

v To export an extended model definition into a model

1. Select Model ä Extended model definitions to display the List ofExtended Model Definitions.

2. Select an extended model definition in the list.

3. Click the Export an Extended Model Definition tool.

A standard Save As dialog box is displayed.

4. Type a name and select a directory for the extended model definition.

5. Click Save.

The extended model definition is saved in a library directory where it canbe shared with other models.

226

Page 235: Eclipse plugin userguide

CHAPTER 6

Working with Eclipse

About this chapter This chapter describes how to work with PowerDesigner in the Eclipseenvironment.

Contents Topic: page

Special Features 228

Generating an Eclipse Project 243

Building and Deploying the Application Using Eclipse 253

227

Page 236: Eclipse plugin userguide

Special Features

Special FeaturesThe Eclipse plugin has several special features analyzed in the followingsections.

Synchronizing an OOM with its Java source code

You can synchronize an Object Oriented Model (OOM) with its Java sourcecode. In other words, each time you modify the model, a source code file isautomatically created (in the case of a new object) or updated (in the case ofan existing object). Likewise, each time you modify a source code file andsave the changes, these changes appear in the diagram and the ModelExplorer.

Synchronization is activated from the Model Explorer or the Navigator. Amodel is synchronized per package. The default package regroups all theobjects at the root of the model. Once a package has been synchronized witha model, you cannot synchronize it with another model, see the section““Limitations” on page 237”.

Other languagesYou cannot synchronize an OOM targeted with another language than Java

Activating synchronization

From the Model Explorer You can activate the synchronization of an OOM from the Model Explorer.

228

Page 237: Eclipse plugin userguide

Chapter 6. Working with Eclipse

v To activate synchronization from the Model Explorer

1. In the Model Explorer, right-click the model item and select Synchronize.

The Synchronize dialog box is displayed.

2. Select the Synchronized check box to activate the group box and selectthe packages you want to be synchronized with their source code. Thedefault package regroups all the objects at the root of the model.

3. Click Finish.

A Java file (.java) and a compiled file (.class) appear for each object inthe synchronized packages of the Navigator.

229

Page 238: Eclipse plugin userguide

Special Features

If you double-click a Java or a compiled file, its source code is displayedin the Editor area.

Note the synchronized symbol on the package icon. . .

. . . and the (synchronized) mention beside the model resource.

From the Navigator You can activate the synchronization of an OOM from the Navigator.

230

Page 239: Eclipse plugin userguide

Chapter 6. Working with Eclipse

v To activate synchronization from the Navigator

1. In the Navigator, right-click the resource item with the model extensionand select Properties.

The model properties dialog box is displayed.

2. Select PowerDesigner in the left pane and the Synchronized check box inthe PowerDesigner page.

3. In the Synchronized group box, select the packages you want to besynchronized with their source code. The default package regroups all theobjects at the root of the model.

4. Click OK.

A Java file (.java) and a compiled file (.class) appear for each object inthe synchronized packages of the Navigator.

If you double-click a Java or a compiled file, its source code is displayedin the Editor.

Example of synchronization

The following example is developed from the synchronized OOM,demo.oom. (See ““Activating synchronization” on page 228”)

231

Page 240: Eclipse plugin userguide

Special Features

v To create and delete an attribute in a synchronized model

1. Double-click the printer symbol, select the Attributes tab, and add ausbPort attribute with a boolean data type and a public visibility.

2. Click OK.

The usbPort attribute is displayed in the printer symbol.

3. In the class diagram, right-click the printer symbol, and select EditSource Code.

or

In the Model Explorer, right-click the printer item, and select Edit SourceCode.

The source code file of the printer class is displayed in a view right underthe diagram.

232

Page 241: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Note that the usbPort attribute is displayed in the synchronized sourcecode.

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.

233

Page 242: Eclipse plugin userguide

Special Features

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 codemanually with the Refresh Source Code feature:

♦ In the Model Explorer, right-click a class, an interface, a synchronizedpackage or model item, and select Refresh Source Code

♦ In a class diagram, right-click a class, an interface or a package symbol,and select Refresh Source Code

Synchronizing a package

You cannot synchronize a package that has already been synchronized.(Implementation rule)

Example In the Model Explorer, create a first OOM targeted with Java. In this firstmodel, create a package and synchronize it.

Click Finish.

In the Navigator, right-click the project item containing the first model andadd a second OOM targeted with Java.

In the Navigator, open the second model properties dialog box and select theSynchronized option.

234

Page 243: Eclipse plugin userguide

Chapter 6. Working with Eclipse

The check box of the package already synchronized with the first model isunavailable. You cannot select it to synchronize the second model.

Deactivating synchronization

If you decide to deactivate synchronization, the model and its source coderemain as they were after the last synchronization.

You can deactivate synchronization in different ways:

♦ In the Model Explorer, right-click the model item, select Synchronize inthe contextual menu, deselect Synchronized, and click Finish

♦ In the Navigator, right-click the resource item with the model extension,select Properties in the contextual menu, deselect Synchronized in thePowerDesigner page, and click OK

♦ In the Navigator, right-click a synchronized package, selectUnsynchronize. The selected package is unsynchronized

Navigating between an OOM and its Java source code

Once you have synchronized an OOM with its Java source code, you can usethe Find In Diagram and the Model Object Properties features in thecontextual menus of the Model Explorer, the Navigator and the source codefiles.

Find In Diagram

The Find In Diagram feature allows you to locate an object in a diagramfrom the Navigator or a source code file.

235

Page 244: Eclipse plugin userguide

Special Features

v To locate an object from the Navigator

1. In the Navigator, right-click an object Java file and select Find InDiagram.

The object symbol is displayed selected (with handles) in the center ofthe diagram.

v To locate an object from a source code file

1. Double-click the name of an object in a source code file.

The object name is selected.

2. Right-click the object name and select Find In Diagram.

The object symbol is displayed selected (with handles) in the center ofthe diagram.

Outline viewTo display the Outline view, select Window ä Show View ä Outline.Activate a model diagram. When you click an object in the Outline view, ittriggers a Find In Diagram. The object symbol is displayed selected (withhandles) in the center of the diagram.

Model Object Properties

The Model Object Properties feature allows you to display an objectproperty sheet from the Navigator or a source code file.

v To display an object property sheet from the Navigator

1. Right-click an object Java file in the Navigator and select Model ObjectProperties in the contextual menu.

The object property sheet is displayed. You can now define or modify theobject properties.

v To display an object property sheet from a source code file

1. Double-click the name of an object in a source code file.

The object name is selected.

2. Right-click the object name and select Model Object Properties in thecontextual menu.

The object property sheet is displayed. You can now define or modify theobject properties.

236

Page 245: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Setting preferences

You can set the following preferences for PowerDesigner in the EclipsePlatform.

Preference Description

Use transient resourcesfor diagrams

Select this option if you want diagram resourcesto be created in the Navigator when diagrams areopen, and deleted when diagrams are closed, seethe following procedure

Close diagram editors onexit

If you exit the Eclipse Platform without closingdiagrams, the models corresponding to those dia-grams are reloaded automatically when restartingthe Eclipse Platform. You can select this optionto avoid reloading models when restarting theEclipse Platform

Flag diagram editor asdirty if parent modelrequires save

Select this option if you want to be reminded thata model has been modified before you save thechanges

Enterprise Modeling ä

Automatically mergemodels on code-to-modelsynchronization

Select this option if you want the merge processto be silent during reverse engineering

v To define a preference

1. In the Eclipse menu bar, select Window ä Preferences to display thePreferences dialog box.

2. Select Sybase, Inc ä PowerDesigner or Enterprise Modeling and selectone or several check boxes corresponding to your preferences.

3. Click OK.

Limitations

This section describes some of the limitations you might find when using thePowerDesigner Eclipse Plugin.

Copy/Paste/Rename features for PowerDesigner resources

In the Eclipse contextual menu, you cannot use the Copy/Paste/Renamefeatures for PowerDesigner resources.

237

Page 246: Eclipse plugin userguide

Special Features

If you create a model and right-click the model or the diagram to display thecontextual menu from the Navigator, you can see that theCopy/Paste/Rename features are not available.

Exporting a project with PowerDesigner resources

You cannot export a project if it contains PowerDesigner resources.

Example Create an OOM targeted with Java.

In the Navigator, right-click the corresponding Eclipse project and selectExport in the contextual menu. An Export dialog box is displayed.

Select File system in the export destination list and click Next. A secondExport dialog box is displayed.

238

Page 247: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Click Browse to select the directory where you want to export the project.Click OK in the Export To Directory dialog box.

If you have not saved the PowerDesigner resources, the Save Resourcesdialog box is displayed.

239

Page 248: Eclipse plugin userguide

Special Features

Click OK in the Save Resources dialog box.

Click Finish in the Export dialog box. A problem message is displayed.

Click Details. The project cannot be exported because it contains aPowerDesigner resource (a model file) that is not local.

Click OK.

The second Export dialog box is still open. In the right panel, deselect thePowerDesigner resource.

240

Page 249: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Click Finish. The Eclipse project is exported to the selected directory.

Editing the preview of a class or an interface

You cannot modify the Java source code of a class or an interface from theirPreview tab.

In the Model Explorer, right-click a model name and select Model Optionsin the contextual menu.

241

Page 250: Eclipse plugin userguide

Special Features

In the All Objects group box, the Preview editable option is unavailable.

242

Page 251: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Generating an Eclipse ProjectEclipse is a platform that allows third parties to add plugins to provide newfeatures and extend the platform. For example, a plugin could provide IDEfeatures, modeling features, code generator, and so on.

There are two Eclipse plugins that may be used by PowerDesignercustomers:

♦ JDT (Java Development Tool) is an IDE that allows users to develop Javaapplications, edit Java code, browse Java classes and compile Java code.Users can define other build commands

♦ EMF (Eclipse Modeling Framework) is a modeling framework and codegeneration facility for building tools and other applications based on astructured object model. From the definition of a model called Ecoremodel, it can generate all the necessary Java code for metadatamanagement, navigation between classes, serialization/deserialization inXML format, Eclipse browser plugin for creating and modifying instancedata

Java development PowerDesigner and Eclipse enable round-trip engineering for Javadevelopment:

♦ Perform high level analysis and design using PowerDesigner

♦ Design and create Java components in PowerDesigner

♦ Generate Java code and Eclipse project files

♦ Open the project in Eclipse

♦ Finish the implementation of Java classes using Eclipse

♦ Compile, package, deploy and debug using Eclipse

♦ Reverse engineer the final Java code to synchronize the PowerDesignermodel

Eclipse projectgeneration

An Eclipse project is stored in a directory. The name of the project is thename of the directory. A project is defined by:

♦ A .project file that defines the name of the project and the buildcommands

♦ A .classpath file that defines the source directory, the binary directory andthe list of libraries

♦ Source files and other files

243

Page 252: Eclipse plugin userguide

Generating an Eclipse Project

By default, a Java project only supports the build command for compilation.Additional commands must be defined with command lines or Ant tasks,which is not always easy to do. Users may also need to add additionallibraries to compile Java files.

PowerDesigner can generate the following files:

♦ .project

♦ .classpath

♦ build.xml for Ant build script

Depending on the type of Java classes contained in a model, PowerDesignercan also add the necessary build tasks and libraries to prevent the users fromdoing it manually.

With the generated Eclipse Project files, users can immediately:

♦ Compile Java classes

♦ Package Java classes to create .JAR, .WAR or .EAR files

♦ Generate Javadoc

♦ Run J2EE verifier

♦ Deploy the .JAR, .WAR or .EAR file into Sybase EAServer, BEAWebLogic, IBM WebSphere and Apache Tomcat

To generate an Eclipse project, you have to create an OOM with the correctprofile and define generation options.

Creating an OOM with the Eclipse profile

In PowerDesigner, you first need to create an Object-Oriented Model (OOM)for Java, then add the Eclipse profile defined in an extended model definition.

v To create an OOM with the Eclipse profile

1. Select File ä New to display the New dialog box.

2. Select Object-Oriented Model in the list of model types.

3. Select the New model radio button in the upper right part of the dialogbox.

4. Select Java in the Object language list of the General tab.

5. Select either Share or Copy.

244

Page 253: Eclipse plugin userguide

Chapter 6. Working with Eclipse

6. Select Class diagram in the First Diagram list.

7. Click the Extended Model Definition tab, click the IDE tab to display thelist of available IDE, and select Eclipse.

8. Click OK.

Configuring the Eclipse project files generation

You need to configure home directories and Eclipse version.

Configuring Eclipse, J2EE and JWSDP home directories

To generate the .classpath file, you need to define an ECLIPSE_HOMEvariable that indicates the Eclipse home directory. You can define theECLIPSE_HOME variable inside PowerDesigner or in the Windowsenvironment variables.

If you plan to generate EJB, Servlets or JSP, you also need to define aJ2EE_HOME variable in PowerDesigner or in the Windows environmentvariables, in order to indicate the J2EE SDK home directory.

If you plan to generate Web Services for Java, you also need to define aJWSDP_HOME variable in PowerDesigner or in the Windows environmentvariables, in order to indicate the Java Web Service Developer Pack homedirectory.

Note: If you add a variable in the Windows environment variables, you mustrestart PowerDesigner.

v To define the ECLIPSE_HOME variable in PowerDesigner

1. Select Tools ä General Options.

2. Click the Variables category in the Category tree.

3. Type ECLIPSE_HOME in the Name column and type the Eclipse homedirectory in the value column.

4. Repeat step 3 for each variable you need to declare.

245

Page 254: Eclipse plugin userguide

Generating an Eclipse Project

Configuring Eclipse Version

PowerDesigner supports the following:

♦ Eclipse platform 3.1.0 and 3.1.1

♦ EMF 1.0.1, 1.1.0, 1.1.1, 2.0.0, 2.0.1, 2.1.0, and 2.1.1

By default, PowerDesigner uses Eclipse platform 3.1.1 and EMF 2.1.1. Ifyou are using a different version of Eclipse, you have to change the Eclipseversion for your current model.

246

Page 255: Eclipse plugin userguide

Chapter 6. Working with Eclipse

v To change the Eclipse version

1. Select Language ä Generate Java Code.

2. Click the Options tab and define the Eclipse and EMF version in theValue column.

Selecting a target application server

PowerDesigner can generate EJBs, Servlets, JSPs and application serverspecific descriptors. In the Ant build.xml file, PowerDesigner can generatethe target server specific deployment commands. If you want to generateEJBs, Servlets or JSPs for a specific application, you need to add anapplication server profile.

The following application servers are supported:

♦ BEA WebLogic Application Server 6.0 and 7.0

♦ IBM WebSphere 5.0

♦ Sybase EAServer 4 and 5

♦ Apache Tomcat 4 or higher

247

Page 256: Eclipse plugin userguide

Generating an Eclipse Project

If you create CMP EJB components, PowerDesigner can generate anapplication server specific configuration descriptor including O/R mappinginformation. In the Ant build.xml file, PowerDesigner generates a serverspecific deployment command.

v To select a target application server

1. Select Model ä Extended Model Definitions.

2. Click the Import an Extended Model Definition tool in the list ofextended model definitions.

3. Select an application server in the Application server page.

4. Click OK

The application server profile is imported into the current OOM.

For more information on how to generate J2EE applications for a specificapplication server, see the technical document for that application server inthe \Printable Docs folder.

Previewing the Eclipse project files

You can preview the Eclipse .project, .classpath and Ant build.xml files fromPowerDesigner.

v To preview the Eclipse project files

1. Open the model property sheet.

2. Click the Preview tab.

3. Click the Eclipse.project tab to preview the Eclipse .project file.

248

Page 257: Eclipse plugin userguide

Chapter 6. Working with Eclipse

4. Click the Eclipse.classpath tab to preview the Eclipse .classpath file.

5. Click the Ant build.xml tab to preview the Ant build.xml file.

249

Page 258: Eclipse plugin userguide

Generating an Eclipse Project

6. Click Cancel to close the model property sheet.

Generating Java code and Eclipse project files

You can generate the Java code for EJBs, Servlets and JSPs along with theEclipse project files.

250

Page 259: Eclipse plugin userguide

Chapter 6. Working with Eclipse

v To generate the Java code and Eclipse project files

1. Select Language ä Generate Java Code.

2. Select the project folder where you want to generate the files. The nameof this folder will be used as the project name.

3. Verify that Eclipse and the target application server are selected in theTargets tab.

4. Select the packages, classes and interfaces you want to generate in theSelection tab.

5. Set the generation options for Java, EJB and the target application serverin the Options tab. To be able to deploy the application in an applicationserver, you need to enter the server name, port number, user name andpassword. If you do not enter these options, you will need to modifythese properties in the generated Ant build.xml file.

251

Page 260: Eclipse plugin userguide

Generating an Eclipse Project

You do not need to select any command task in the Tasks tab.

6. Click OK to generate the Java code and the Eclipse project files.

252

Page 261: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Building and Deploying the Application UsingEclipse

You should start Eclipse using the eclipse.exe program to work on thegenerated Java project.

If the Java project is a new project You need to import it into the Eclipseworkspace.

If the Java project is an existing project You need to refresh the project.

Generating Java code from PowerDesigner Eclipse plugin

If you use the PowerDesigner Eclipse plugin, a Class Diagram can besynchronized with Java files. You do not need to generate the Java code. Ifthe Class Diagram is not synchronized with Java files, when you generateJava code using Language ä Generate Java Code, an Eclipse project isautomatically generated or updated.

If you do not use the PowerDesigner Eclipse plugin, you need to import thegenerated project manually into Eclipse.

Importing a project intothe Eclipse workspace

v To import the generated Eclipse project into the Eclipseworkspace

1. Select File ä Import.

2. Select Existing project into workspace as the import source and clickNext.

3. In the directory selection window, select the project directory where youhave generated the code.

4. Click Finish to start importing the project.

Refreshing a project When you regenerate Java code from PowerDesigner or modify some filesoutside Eclipse, you need to refresh the project.

v To refresh a project

1. Right-click the project in the Eclipse Package Explorer.

2. Select Refresh.

Building a J2EE application

To build a J2EE application you have to compile Java files and then deploy.

253

Page 262: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

Compiling and packaging Java files

For a J2EE application, PowerDesigner generates a packaging command.The packaging command uses the pack task of the Ant build.xml file. Thepackaging command is automatically invoked when Eclipse compiles Javafiles.

When you refresh a project, all the Java files are compiled and packaged.

When you save Java files, the files are compiled and packaged.

You can also recompile and repackage manually.

v To recompile and repackage Java files

1. Select the project in the Eclipse Package Explorer.

2. Select Project ä Rebuild Project.

Deploying EJB, Servlets and JSP

v To deploy EJB, Servlets and JSP into an application server

1. Right-click the build.xml file in the Eclipse Package Explorer.

2. Select Run ä Ant Build.

3. In the Modify Attributes and Launch dialog box, select the deploy task.

254

Page 263: Eclipse plugin userguide

Chapter 6. Working with Eclipse

4. Click Run.

By default, the deploy task deploys the .EAR file. The Ant build.xml filecontains the server name, port number, user name and password propertiesused for deployment.

These properties are generated from the PowerDesigner generation options.If you did not set these properties correctly when you generated the filesfrom PowerDesigner, you may need to edit the build.xml file to set theseproperties prior to deployment.

Using other Ant tasks You can also use other Ant tasks to generate Javadoc, and run J2EE verifierto check if the packaged J2EE application is correct.

v To use other Ant tasks

1. Right-click the build.xml file in the Eclipse Package Explorer.

2. Select Run ä Ant Build.

3. In the Modify Attributes and Launch dialog box, select the desired Anttask.

4. Click Finish.

255

Page 264: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

Customizing Eclipse project files generation

The generation of Eclipse project files in PowerDesigner 11 is defined in theEclipse profile in the Eclipse extended model definition. The Eclipse profileis based on the Java language definition file (Java.xol). It uses templatesdefined in the Java XOL for J2EE application deployment descriptors.

The Eclipse profile adds Eclipse specific generation templates.

The Ant build.xml file generation is defined in the Java language definitionfile for the standard Ant script and in application server profiles forapplication server specific deployment commands.

When the Eclipse profile is used, the Ant build.xml does not define thecompile task because the Eclipse JDT provides a Java compiler.

You can customize project generation if necessary.

v To customize the Eclipse project files generation

1. Select Tools ä Resources ä Extended Model Definitions ä

Object-Oriented Models.

2. Double-click Eclipse in the List of Extended Model Definitions.

3. Use the profile editor to modify the Eclipse profile.

256

Page 265: Eclipse plugin userguide

Chapter 6. Working with Eclipse

4. Click OK to close the profile editor.

Eclipse EMF Ecore model generation

EMF (Eclipse Modeling Framework) uses an internal metamodel calledEcore. Ecore is a subset of MOF. Before using the EMF code generator, auser should define an Ecore model.

Eclipse EMF overview

The Ecore model will be used to generate the implementation classes. Thereare several ways to define an Ecore model:

♦ Using Ecore XMI file

♦ Using annotated Java classes

♦ Using a Rose model

In this section, we use the Ecore XMI file to generate an Ecore model from aPowerDesigner Class Diagram.

♦ The Ecore XMI format consists of:

♦ A .genmodel file for all the packages

♦ A .ecore file for each package

257

Page 266: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

From the definition of the Ecore model, the EMF code generator generatesinterfaces and implementation classes that provide: class factory, metadatamanagement, getters/setters, object navigation, serialization/deserialization,undoable commands, notifications, Eclipse plugin for creating andmodifying instance data.

+ For more information on EMF, see the EMF documentation and tutorialsat www.eclipse.org/emf.

Installing Eclipse EMF

Since Eclipse is an open source project, you can install it and use it free ofcharge. To install Eclipse EMF, you need to download and install the Eclipseplatform and the JDT first. Then you can download and install EMF.

v To install EMF

1. Go to the web site www.eclipse.org/emf

2. Select the latest release.

3. Download the Eclipse EMF runtime binary .ZIP file. You can alsodownload the Eclipse EMF documentation.

4. Unzip the downloaded .ZIP file into the Eclipse home directory and makesure you keep the folder names as defined in the .ZIP files.

PowerDesigner supports EMF 1.0.1 or higher.

Creating a PowerDesigner class diagram for EMF Ecore model

The overall process is the following:

♦ Create an Object-Oriented Model (OOM) with Java target language.Import the Eclipse extended model definition into the model as definedearlier in this chapter

♦ Enable the EMF Ecore Model generation

♦ Define the class diagram as if you define a class diagram for a Javaprogram

♦ Define EMF specific extended attributes

♦ Verify the .ecore files and the .genmodel file

Enabling the EMF Ecore Model generation

By default, the EMF Ecore model is not generated when the Eclipse profileis added to the model.

258

Page 267: Eclipse plugin userguide

Chapter 6. Working with Eclipse

v To enable the generation of Ecore model

1. Select Language ä Generate Java Code.

2. Click the Options tab.

3. Set the Generate Eclipse Modeling Framework (EMF) Ecore modeloption to True.

4. Click Apply to save the settings.

5. Click Cancel to close the window.

Configuring the EMF version

By default, PowerDesigner uses Eclipse 3.1.1 and EMF 2.1.1. If you areusing a different version of EMF, you have to change the EMF version foryour current model.

v To configure the EMF version

1. Select Language ä Generate Java Code.

2. Click the Options tab.

3. Define the EMF version and Eclipse platform version.

4. Click Apply to save the settings.

5. Click Cancel to close the window.

Defining the class diagram

You can define the class diagram as if you were working on a standard Javaapplication. The .genmodel file is generated from the model.

Each top level package generates an EPackage.

Each class and interface generates an EClass.

Each class with an “enumeration” stereotype generates an EEnum.

You do not need to create a class with the DataType stereotype for the Javadata types that are not part of the Ecore data types like other modeling toolsdo. PowerDesigner automatically generates EDataType for you during.ecore files generation.

Defining extended attributes

You can customize the .ecore files and the .genmodel file generation bychanging the values of some extended attributes.

259

Page 268: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

Model ExtendedAttributes

Name Description

BasePackageName Base package name

EditorPluginClass Editor plugin class name

EditPluginClass Edit plugin class name

ModelPluginID Model plugin ID

NamespacePrefix Namespace prefix of the package

NamespaceURI Namespace URI of the package

Package ExtendedAttributes

Name Description

BasePackageName Base package name

NamespacePrefix Namespace prefix of the package

NamespaceURI Namespace URI of the package

Attribute ExtendedAttributes

Name Description

Unique Indicates whether a many-valued attribute is allowed tohave duplicates

Unsettable Generates a unset method to undo the set operation

Association ExtendedAttributes

Name Description

RoleADefaultValue Default value of Role A attribute

RoleAResolveProxies Resolves proxies if the Object A is in another file

RoleATrancient Indicates that navigation from Object B to ObjectA is transient

RoleAUnique Indicates whether a many-valued Role A attributeis allowed to have duplicates

RoleBDefaultValue Default value of Role B attribute

RoleBResolveProxies Resolves proxies if the Object B is in another file

RoleBTransient Indicates that navigation from Object A to ObjectB is transient

260

Page 269: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Name Description

RoleBUnique Indicates whether a many-valued Role B attributeis allowed to have duplicates

Verifying the .ecore files

Each top level package generates a .ecore file.

v To verify a .ecore file

1. Open the property sheet of a package.

2. Click the Preview tab.

You can also preview the .ecore file for a specific class:

v To preview the .ecore file for a specific class

1. Open the property sheet of a class.

2. Click the Preview tab.

3. Select the Ecore tab.

Defining .ecore files

EPackage

Tag Name Description Use

Name Package name Package code

261

Page 270: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

Tag Name Description Use

NsURI Namespace URI of the package,i.e. the URI that is displayedin the xmlns tag to identify thispackage in an XMI document

Extended AttributeNamespaceURI.The default value is%Code%.xmi

NsPrefix Namespace prefix that is usedwhen references to instances ofthe classes in this package areserialized

Extended AttributeNamespacePrefix.

The default value is%Code%

Prefix Used as the prefix for the namesof the generated Factory andPackage classes

Not supported.

The default value willbe the package code

BasePackage Prefix used for the Java packagethat contains the generated codefor the model

Not supported.

The base package willbe generated in the.genmodel file

EClass A class will generate an EClass.

262

Page 271: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Tag Name Description Use

Name Used to construct the names of thegenerated interface and implementationclass

Class code

instanceClass Used by the EMF runtime to validatethe type of objects

Not supported

defaultValue Intrinsic default value for a class. Thisdefault will be applied to any attributesof the class

Not supported

Abstract If set to True, the generated imple-mentation class will have the abstractkeyword

Class abstractattribute

interface If set to True, only the java interfacewill be generated. There will be nocorresponding implementation classand no create method in the factory

Interface

eSupertypes Super type for this class Parent class of aGeneralization

EAttribute A class attribute will generate an EAttribute.

Tag Name Description Use

Name Name used to construct the names ofaccessor methods

Attribute code

EType Attribute type Attribute data type

changeable Indicates whether the attribute may bemodified

Attribute Change-ability property. SetChangeability toRead Only impliesthat changeable isset to False

volatile Indicates whether the attribute cannotbe cached. If volatile is set to True, thegenerated class does not contain a fieldto hold the attribute and the generatedget() and set() methods for the attributeare empty

Attribute Volatileproperty

263

Page 272: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

Tag Name Description Use

transient Indicates whether the attribute shouldnot be stored

Attribute persistentproperty. Transientis the inverse valueof persistent

unique Indicates whether a many-valued at-tribute is allowed to have duplicates

Extended attributeUnique

defaultVal-ueLiteral

Determines the value returned by theget method if the attribute has neverbeen set

Attribute initialvalue

lowerBound Determines the setting of the requiredproperty. If lowerBound is 0, the re-quired property will be set to False.Otherwise, the required property willbe set to True

Attribute multiplic-ity

upperBound Determines the setting of the manyproperty. If upperBound is 1, the manyproperty will be set to False. Otherwise,the many property will be set to True

Attribute multiplic-ity

many If many is set to True, there is no set()method for the attribute and the get()method returns a list that can onlycontains objects of the appropriate type

Not generated. Itwill be computedfrom upperBound

required Indicates whether the attribute is re-quired

Not generated. Itwill be computedfrom LowerBound.

unsettable Indicates that the attribute may be unset Extended attributeUnsettable

EReference An association will generate an EReference.

Tag Name Description Use

Name Name used to construct the namesof accessor methods

Opposite role name orassociation code

eType Reference type Opposite class code

264

Page 273: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Tag Name Description Use

changeable Indicates whether the referencemay be modified. If changeableis set to False, no set() method isgenerated for the reference

RoleA or RoleBchangeability

volatile Indicates whether the referencecannot be cached. If volatile isset to True, the generated classdoes not contain a field to hold thereference and the generated get()and set() methods for the referenceare empty

RoleA or RoleBvolatile

transient Indicates whether the referenceshould not be stored

Extended attributeRoleATransient orRoleBTransient.

unique Indicates whether a many-valuedattribute is allowed to have dupli-cates

Extended attributeRoleAUnique or Role-BUnique

defaultValue Determines the value returned bythe get method if the attribute hasnever been set

Extended attributeRoleADefaultValue orRoleBDefaultValue

lowerBound Determines the setting of the re-quired property

Role A or Role Bmultiplicity

upperBound Determines the setting of the manyproperty

Role A or Role Bmultiplicity

containment Indicates whether the reference isa containment

Role A or Role Bcomposition

container Indicates whether the reference isa container. This is the oppositeof a containment EReference. Ifcontainer is true, the generated ac-cessor methods will have containersemantics

Role A or Role Bcomposition

resolveProxies Indicates whether proxy referencesshould be resolved automatically

Extended attributeRoleAResolveProx-ies or RoleBResolve-Proxies. The defaultvalue is true

265

Page 274: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

Tag Name Description Use

eOpposite Identifies the EReference that rep-resents the opposite end of therelationship

Computed

EEnum A class with the stereotype <<enumeration>> will generate an EEnum.

Tag Name Description Use

Name Used to construct thenames of the generatedinterface and implemen-tation class

Class code

EEnumLiteral An attribute defined in a class with the stereotype <<enumeration>> willgenerate an EEnumLiteral.

Tag Name Description Use

Name Name used to generate the finalstatic constants in the enumerationclass that are used to access theliteral.

Attribute code

value Determines the integer value that isassociated with this literal

Attribute initial value.The default value is 0

EOperation An operation will generate an EOperation.

Tag Name Description Use

Name Name of the generated method Operation code

eType Method return type Operation return type

EParameter An operation parameter will generate an EParameter.

Tag Name Description Use

Name Name of the generated argument Parameter code

EType Argument type Parameter type

EDataType A Java data type used by an attribute, an operation or a parameter that is notpart of the Ecore data types will automatically generate an EDataType.

266

Page 275: Eclipse plugin userguide

Chapter 6. Working with Eclipse

Verifying the .genmodel file

The .genmodel file will be generated from the model and the packages.

v To verify the .ecore file

1. Open the property sheet of the model.

2. Click the Preview tab.

3. Click Cancel to close the property sheet.

267

Page 276: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

Defining .genmodel file

Tag Name Description Use

basePackage Name of the base pack-age. For example, org.-eclipse.emf

Extended attribute BasePa-ckageName defined in themodel or package. The de-fault value is org.eclipse.emf

modelPluginID Model plugin ID Extended attribute Mod-elPluginID defined in themodel

editPluginClass Edit plugin class name Extended attribute EditPlug-inClass defined in the model

editorPluginClass Editor plugin class name Extended attribute Editor-PluginClass defined in themodel

Generating EMF Ecore model

v To generate an EMF Ecore model

1. Select Language ä Generate Java Code.

2. Select the project directory where you want to generate the files. Thename of this directory will be used as the project name.

3. In the Options tab, verify that the Generate Eclipse Modeling Framework(EMF) Ecore model option is set to True

4. Click OK.

Notes

♦ When you use PowerDesigner Class Diagram to generate EMF Ecoremodel, the Java classes and Ant build.xml files will not be generatedbecause the EMF Ecore model is used as the logical model of yourobjects. The Java interfaces and implementation classes will be generatedby the EMF code generator from the Ecore model

♦ If you use interfaces, you should not add the interface operations in theclasses that implement the interface because the EMF code generator willadd these operations

Generating EMF implementation classes

268

Page 277: Eclipse plugin userguide

Chapter 6. Working with Eclipse

v To use the EMF code generator to generate the implementationclasses1. Start Eclipse.

2. If the project already exists, you can right click the project and selectRefresh. If it is a new project, you need to import the generated project:Select File ä Import, select Existing project into workspace, select thegenerated directory name in the directory browser.

3. Right-click the .genmodel file and select Open with ä EMF Generator toopen the file. You can see a tree view that shows the contents of the Ecoremodel.

4. Right-click the root of the tree view and select Generate All.

The EMF code generator will create three projects: the model project, theedit project and the editor project and will compile them.

269

Page 278: Eclipse plugin userguide

Building and Deploying the Application Using Eclipse

5. Use the generated classes in your own application.

+ For more information on how to use the generated classes and theeditor, see the EMF documentation.

Notes

♦ Once you have the generated interfaces and implementation classes, youcan add more attributes and operations

♦ You can also implement your operations or change the generatedoperations

♦ You can change your Ecore model by changing the PowerDesigner ClassDiagram and regenerate the Ecore model, then use EMF code generatorto regenerate the Java code. EMF will keep the attributes and operationsyou have added manually

♦ If you change a generated operation and do not want EMF to overwriteyour changes, you should remove the @model Javadoc tag to avoidlosing your changes the next time you generate the code using EMF codegenerator

270

Page 279: Eclipse plugin userguide

Index

Aaccent 130ActiveX

add-in 74add-in 74

ActiveX 74class 74declare 77enable 75file 74Meta-integration Import Export 75Microsoft Analysis Services 75Microsoft Word Import Export 75.Net Reverse Engineering 75Spell Checker 75system 77type 74user 77XML 74XML Validation 75

annotationattach 166object 166text editor 69

Ant build 254application

build 253deploy 253

application program for file object 217application server 247apply transformations 151arrange

position in list 58artifact 207

add objects 212C# 207change file name 212create hierarchy 212default template 207define 210drag and drop objects 212enforce dependencies 212

file object 215generate 105, 212generate from folder 213how to use them 207objects 210overview 210prerequisites 210property 215stereotype 207template 210VB .NET 207

artifact folder 212generate 213

attachextended dependencies 217file object to a PowerDesigner object 217

authormodel 10, 103

auto commitdialog box 68option 57, 68property sheet 52

automatic correctioncheck model 127

Bbackup

file 99resource file 154

bibliography viibinary file 99BMR 99borrow mobile license 82BPB 99BPM

close 101create 10, 96define 10, 96delete 101namespace 108object 162object identification 191

271

Page 280: Eclipse plugin userguide

Index

open 98property 103rename 101save 99save all 100select extended model definition 224

business rule 178apply 181check parameter 178constraint 179create 178definition 179expression 180fact 179formula 179ocl 180OCL constraint 179properties 179requirement 179type 179validation 179

business rule applied to object 45

CC#

artifacts 207C# artifacts 207CanLinkKind event handler 185CDB 99CDM

close 101create 10, 96define 10, 96delete 101link special 116namespace 108object 162object identification 191open 98property 103rename 101save 99save all 100select extended model definition 224

charactercode 130default list 130

invalid 130name 130valid 130

check model 124, 126automatic correction 127manual correction 127

check parameterbusiness rule 178

closelist 66property sheet 53

codecharacter 130diagram 111display 130find 202format 130, 131length 130model 10, 103naming convention 140object 162, 165package 107preview from an object 168property sheet 17, 44text editor 69

code naming convention 145code naming convention in resource file 145code page 147code to name conversion 135collapse nodes with hot key 8comment

diagram 111display in symbol 162model 10, 103object 162, 165package 107

compileJava files 254

complete links 116, 164computer name 86, 89confirm deletion 67conflict

manage 191paste 191

connection profile 22, 24, 31JDBC example 29native example 28

272

Page 281: Eclipse plugin userguide

Index

properties 26tools 30

contextual menu 151conversion script 137conversion table

create 143CSV file 141delete 145modify 144resource 153

convert diagram to package 119convert_code 139convert_name 139, 140copy

clipboard 187diagram 187drag and drop 186in a list 55list 187Modeling Result List 187object 187option 67select object 187tree view 187

creation dateproperty sheet 50version info 50

ctrl+n to insert row 69custom dictionary 147customize

column in a list 64expression filter 65page scale 111property sheet 17, 42

customize perspective 4cut in a list 55

Ddata connection 22, 24, 26, 30, 31data item

move entity 123, 195namespace 123, 195

databaseconnecting to 22, 24, 26, 30, 31SQL query 32

DBMSconnecting to 22, 24, 30, 31

extended attribute 173resource 153

default diagrammodel 10, 103package 107

default font option 73default name insertion with down arrow 69delete

confirm 192extended model definition 223free symbol 193impact analysis 192object 192object from list 194option 194related objects 192symbol 192

dependence linkexternal 47internal 47

dependency 47, 173extended influences 47inherited by 47inherits from 47model 47shortcut 47update from repository 47

deployEJB Servlet and JSP 254

descriptionattach 166object 166text editor 69

detachmodel from project 40

diagram 2add to model 111add to package 111code 111comment 111convert to package 119copy 187create 111create extended dependencies 49create from a diagram 111create from the Model Explorer 111create from the model node 111

273

Page 282: Eclipse plugin userguide

Index

create package 21, 107default 111define 111delete 119display hidden symbol 114drag and drop 121, 186find object symbol 117hierarchical 112manage 112Model Explorer 37move 121name 111navigation listbox 112new 111open 55, 112page scale 111paste 188property 111related 118save 119select 112show symbol 113, 114symbol 113tree 112window 5

diagram type for package 107dialog box

auto commit 68automatic row insertion 69name to code mirroring 68object list 68operating modes 68options 68property sheet 68use default name 69

disablecustomization parameters 64filter 64filter in a list 55

displaycode 130column 64list 17, 54Model Explorer 67name 130parent property sheet 42property sheet 17, 41, 44

shortcut 54symbol 114

display fontchanging 73

display preferencesfile object 218

down arrowinsert default name 69insert row 69

download license file 86, 89drag

in Model Explorer 9, 38drag and drop 186

create external file 215create replication 186create shortcut 186ctrl 186default 186diagram 121, 186Modeling Result List 186modify default behavior 189modify default behavior (Model Explorer) 186open contextual menu 186options 67shift 186shift + alt 186shift + ctrl 186, 189show symbol 114tree view 186use 186

drop in Model Explorer 9, 38

EEAServer 247Eclipse

Ant build 254build application 253build J2EE application 253build.xml 254compile Java 244compile Java files 254configure generation 245create OOM with Eclipse profile 244customize project generation 256deploy 244deploy application 253deploy EJB Servlet and JSP 254

274

Page 283: Eclipse plugin userguide

Index

EAServer 247Ecore 257EMF 257generate from PowerDesigner plugin 253generate Java code 250generate project 244generate project files 250generation overview 243home directory 245import project 253install EMF 258J2EE home directory 245Java development 243JWSDP home directory 245package Java classes 244package Java files 254PowerDesigner class diagram for EMF 258PowerDesigner plugin 253preview project 248profile 244project 243refresh project 253select target application server 247version 246

Ecore 257define .ecore files 261EAttribute 263EClass 262EDataType 266EEnum 266EEnumLiteral 266EOperation 266EPackage 261EParamter 266EReference 264

editModel Explorer 37

edit in placegeneral option 172graphical tool behavior 67symbol 172word wrap 172

editor area 2, 5e-mail for model sending 106embedded file property 215EMF 257

define .genmodel file 268

extended attributes 259generate EMF Ecore model 268generate EMF implementation classes 268generation 258install 258verify 261verify the .genmodel file 267version configuration 259

enablecustomization parameters 64filter 64filter in a list 55links to requirements 46transformations 149

enforce dependencies 212entity

move 123, 195namespace 123, 195rename 192

entryresource editor 154

error 126Execute SQL Query 32expand nodes with hot key 8export

extended model definition 225XMI file 156, 157XML 157

expressionbusiness rule 180filter 65find objects 202

extended attribute 173customize columns and filter 173data type 173default value 173form 176list of objects 173modify in list 173profile 176profile in DBMS or target language 173specific tab 176

extended attributesEMF Ecore model 259

extended dependency 48create from property sheet 49create in diagram 49

275

Page 284: Eclipse plugin userguide

Index

dependent object 49influent object 49move 49stereotype 48symbol 49

extended link 183add to model 183CanLinkKind 185display preferences 185link 184resource file 183

extended model definition 104, 219change name and code 224create 219delete 223export 225extended attribute 173find 223generic 219import 224missing 223naming conventions 224new BPM 224new CDM 224new FRM 224new ILM 224new OOM 224new PDM 224new RQM 224new XSM 224open 223resource 153specific 219XEM extension 219

extended object 183add to model 183display preferences 184properties 184resource file 183

extension.BPM 99.CDM 99.FEM 99.ILB 99.ILM 99.OOM 99.PDM 99

property 215.RQB 99.RQM 99.XSM 99

external file property 215external link retrieved with repository 47external shortcut

open property sheet 68open target object 68

FFEB 99FEM

close 101create 10, 96define 10, 96delete 101namespace 108object 162object identification 191open 98property 103rename 101save 99save all 100

filemodel 10, 96

file objectartifact 215attach to a PowerDesigner object 217create 215define 215display preferences 218extended dependencies 217open 217open with 217properties 215text editor 69

filenamemodel 10, 103modify in the project 101

filtercolumn order 64define 64disable 64display columns 64enable 64

276

Page 285: Eclipse plugin userguide

Index

expression 64, 65list 55, 64tools 64wildcards 65

findcase sensitive 202creation date 203date parameter 203define parameter 201expression 202extended model definition 223graphical synonym 200in a list 55model type 202modification author 203modification date 203object 201, 202object code 202object in Model Explorer 9, 38object name 202object owner type 203object symbol in diagram 117object type 202regular expression 51shortcut 202user parameter 203wildcard 202

find in diagram 235floating license 82

check during execution 84mobile 82

folder 2add item 39create 39create item 39define 39delete 40drag and drop model 39name 39rename 39

fontchanging 73

foreach_part 138form for additional extended attributes 176format

code 130, 131define 131

name 130, 131naming template 132remove in RTF editor 166type of object 131

free model 129free symbol

delete 193

Ggeneral option for spell checker 147generate

artifact 105, 207check model 105Eclipse EMF Ecore 257Eclipse Java code 250Eclipse project 244Eclipse project files 250EMF Ecore model 258, 268EMF implementation classes 268files 207model 104options 168property 215target 105target definition 104task definition 105transformation 149

generated files tab 212generic extended model definition 219, 220.genmodel file 267, 268grace period

floating license 84license management 84

graphical synonymcreate 198find 200link object 198object 198

graphical tool behavior 67GTL (Generation Template Language) 137GUID (Global Unique ID) 99

Hhide

symbol 114hierarchical diagrams 112host ID 86, 89

277

Page 286: Eclipse plugin userguide

Index

hot keycollapse all 8expand all 8

Iicon

in a list 55identify

object 13, 162properties 191

ILB 99ILM

close 101create 10, 96define 10, 96delete 101extended model definition 224namespace 108new 224open 98property 103rename 101save 99save all 100

implementation classes 268import

extended model definition 224model 12XMI file 156XML 156

import project 253include composite objects tool 55include sub-objects

composite objects 59selection list 59

include sub-packagesselection list 59tool 55

insertdefault name automatically 69row automatically 69row in a list 55

internal shortcutopen property sheet 68open target object 68

itemadd in a list 55

multi-select in a list 54select all in a list 54select from a tree 62

JJ2EE application 253J2EE home directory 245JDBC connection profile 29JWSDP home directory 245

Kkeyboard shortcut for code preview 168

Llayout

property sheet 68Less button in property sheet 42license 80license file 86, 89

download 89license server 86Sybase Product Download Center 89troubleshooting 84

license management 80, 83changing from standalone local to standalone

served 88changing from standalone to floating served 88changing from trial to license 87check during execution 84floating license 82grace period 84local license 80local license authorization 83mobile 82package authorization 83parameters 87regular license 80served license 80standalone seat - local license 81standalone seat - served license 81Sybase Product Download Center 86trial 80trial expiration 84trial extension 87troubleshooting 84type 88

278

Page 287: Eclipse plugin userguide

Index

license management wizard 87access 88provide license file 89select a type of license 88select license server 91select package 91validate 92

license server 91license file 86name 91TCP port number 91

limitationcopy/paste/rename 237edit class or interface preview 241export project 238package synchronization 234

linkautomatic completion 116CDM special 116create 13

link objectcomplete links 164create from list 14, 164create from the Model Explorer 14, 164create graphically 163create in a list 19, 57destination 19, 57graphical synonym 198source 19, 57

list 5add item 18, 55, 57add link object 19, 57add row 55arrange 58auto commit 68close 66column order 64contextual menu 17, 54copy 55, 187customize 64cut 55D column 64default name 69delete 55delete object 194dialog box 17, 54disable filter 55, 64

display 17, 54display columns 64display contextual menu 54display from the Model Explorer 17, 54enable filter 55, 64filter 55, 64, 65find 55hide columns 64icon in a list 55include shortcuts 59include sub-objects 59include sub-packages 59include sub-packages using same namespace 59insert row 55model 17, 54modify 57modify extended attributes 173name to code mirroring 68object 17, 54, 57object selection 61operate 68option 57package 17, 54paste 55, 188position 58PowerDesigner 17, 54properties 55select all 54select items 59tools in the list toolbar 55U column 65use 17, 54validate 57

local license 80, 81location

log file 67model 10, 96

location typeproperties 215

log file location 67

Mmacro 137

.convert_name & .convert_code 137

.delete 137

.foreach_part 137

.lowercase 137

279

Page 288: Eclipse plugin userguide

Index

.replace 137

.uppercase 137manual correction

check model 127MAPI 106message

create 13Meta-integration Import Export 75Microsoft Analysis Services 75Microsoft Word Import Export 75mobile mode 82

borrow license 82return license 83

model 2add diagram 111add to the project 102author 10, 103backup file 99check 124close 39, 101code 10, 103comment 10, 103create 10, 96create from template 10, 96default diagram 10, 103default name 10, 96define 10, 96delete 101delete object 192, 194delete related objects 192drag and drop to folder 39file 10, 96filename 10, 103free 129generate 104generated as 47generated from 47import 12import extended model definition 224include objects 59list 17, 54location 10, 96name 10, 103namespace 108naming conventions 131new 10, 96new diagram 111

object 2open 12, 98open as read-only 99options 130properties 10, 103save 99save all 100send 106validate 124version 10, 103

model default name 10, 96Model Explorer 5

category 8collapse all 8create package 21, 107diagram 37display contextual menu 37display diagram window 37display options 67display property sheet 37display report editor 37drag 9, 38drop 9, 38edit in place 37expand all 8find object symbol 117find objects 38identify items 8manage 36node 8options 67rename object 173report 37report editor 37search for objects 9tree view 5

model explorer view 2model object properties 236modeling output view 2Modeling Result List 2, 5, 205

copy 187copy objects 205drag and drop 186find object symbol 117, 206modify object properties 206paste 188

modification date

280

Page 289: Eclipse plugin userguide

Index

property sheet 50version info 50

More button in property sheet 42move

diagram 121drag and drop 121, 186entity 123, 195extended dependency link 49linking object 119, 121, 196object 195option 67

move objectsfrom package to package 195

multi-line tab 68Multi-Model Report creation 10, 96multiple property sheets 68multi-selection for mass changes 54

Nname

character 130diagram 111display 130find 202folder 39format 130, 131length 130model 10, 103object 162, 165package 107property sheet 17, 44

name to code conversion 130, 135enabled 130, 135

name to code mirroringdialog box 68option 68

named pathcreate 73delete predefined named path 71internal path 71link between documents 71modify predefined named path 71open file 72option 71predefined 71save file 72unresolved named path 72

namespaceBPM 108CDM 108data item 123, 195entity 123, 195FEM 108identify object 162ILM 108model 108OOM 108package 107–109PDM 108RQM 108XSM 108

naming conventions 130apply template 134code 140, 145extended model definition 224model 131other objects 131package 131template 132

naming templateapply 134create 132format 132modify 132

native connection profile 28navigate in diagrams 112navigator view 2.Net Reverse Engineering 75new

BPM 224CDM 224diagram 111FRM 224ILM 224OOM 224PDM 224RQM 224XSM 224

nodecollapse with hot key 8expand with hot key 8Model Explorer 8

note 47attach to an object 166

281

Page 290: Eclipse plugin userguide

Index

external editor 166text editor 69

notes tab 166numpad (-) 8numpad (*) 8

Oobject

annotation 47, 166artifacts tab 207attach a requirement 46attach notes 166BPM 162CDM 162code 162, 165comment 162, 165confirm 61copy 187copy from the Modeling Result List 205create 13, 163create from list 14, 164create from the Model Explorer 14, 36, 164create graphically 163delete from list 194delete related objects 192delete symbol 192dependencies 47, 173description 47, 166drag and drop 186extended attributes 173FEM 162find 201, 202find with expressions 202format 131graphical synonym 198has symbol 36identify 13, 162identify in list 59identify in the Modeling Result List 206list 17, 54, 57modify properties from the diagram 19, 170, 172modify properties from the list 19, 170, 171modify properties from the property sheet 19, 20,

170, 171modify properties in a list 20move 195move between packages 119, 196

move diagram to package 121move with links 119, 121, 196name 162, 165non-oriented link 119, 121, 196notes 47object location filter 59OOM 162oriented link 119, 121, 196paste 188PDM 162preview code 168properties 165property sheet 16, 41rename in the Model Explorer 173select 187XSM 162

Object Constraint Language 180object language

extended attribute 173resource 153

object symbolfind from the Modeling Result List 206find in diagram 206find in Model Explorer 206

ocl 180ODBC 22, 31

administrator 22OOB 99OOM

close 101create 10, 96define 10, 96delete 101namespace 108object 162object identification 191open 98property 103rename 101save 99save all 100select extended model definition 224

openmodel 12read-only 99related diagram 119resource file 155

282

Page 291: Eclipse plugin userguide

Index

open diagram tool 55operate

auto commit 68dialog box 68name to code mirroring 68

optionauto commit 57, 68automatic row insertion 69copy 67default font 67define 67define default font 73define for deletion 67define for dialog boxes 68define text editor 69delete 67, 194dialog box 67drag and drop 67environment variables 70general 67generate 105generation 104graphical tool behavior 67keep last tab 68keep size 68manage add-ins 74model 130Model Explorer 67Model Explorer drag and drop 186move 67multiple 68name to code mirroring 68named path 67, 71natural sort 67Output pane log file 67Output pane log path 67replica 67repository 67shortcut 67single 68text editor 67use default name 69variable 67

order of columns 64origin object in version info 50output

window 5

Output pane log path options 67

Ppackage 2, 91

add diagram 111build 21code 107comment 107create 21, 107default diagram 107define 21, 107delete object 194diagram type 107hierarchy 21include objects 59Java files 254list 17, 54move diagram 121move object 119, 196name 107namespace 107, 108naming conventions 131new diagram 111open diagram 112parent 111property 107save 21, 108use parent namespace 109

pagescale 111

parentdiagram 111property sheet 42

parent namespace 109paste

as shortcut 114, 190conflict 191diagram 188identifying property 191in a list 55in external application 188in PowerDesigner 188list 188manage conflict 191object 188rename 191shortcut in diagram 189, 190

283

Page 292: Eclipse plugin userguide

Index

shortcut in tree view 189, 190target 188tree view 188

PDB 99PDM

close 101create 10, 96define 10, 96delete 101namespace 108object 162object identification 191open 98property 103rename 101save 99save all 100select extended model definition 224

pluginPowerDesigner 253

PowerDesignercomponents 5copy 187diagram window 5drag and drop 186editor area 5list 5Model Explorer 5modeling environment 2Modeling Output 5Modeling Result List 5options 67package 91paste 188perspective 2property sheet 5report editor 5report template editor 5resources 153upgrading 158window 5

PowerDesigner plugin 253predefined

named path 71preference

close diagram editors on exit 237flag diagram editors 237

merge models automatically duringsynchronization 237

use transient resources for diagrams 237prerequisites 210preview 248

bookmark 168change generation options 168code of an object 168keyboard shortcut 168refresh 168

process languageextended attribute 173resource 153

profile 153extended attribute 173

profile for Eclipse 244project

add ERwin model 102add PAM 102add Rose model 102build.xml 243change filename 101classpath 243create 10, 96customize generation 256detach model 40Eclipse 243generation overview 243preview 248

propertyBPM 103CDM 103diagram 111FEM 103ILM 103model 10, 103Model Explorer 37modify from the Modeling Result List 206object 165OOM 103package 107PDM 103RQM 103XSM 103

property sheet 5, 16, 41auto commit 52, 68buttons 68

284

Page 293: Eclipse plugin userguide

Index

close 53code 17, 44creation date 50customize 17, 42dependencies 47, 173Dependencies tab 16, 41display 41display parent 42extended attribute 173Extended Dependencies tab 16, 41find object symbol 117general page 17General tab 16, 41general tab 44insert properties 17, 44keep last tab 68keep size 68last tab 41layout 68menu 42modification date 50multi-line 68multiple 68name 17, 44name to code mirroring 68notes 47Notes tab 16, 41notes tab 166open mode 68open option 68operate 68parent 42Rules tab 16, 41save 52shift key 68single 68single line 68tab presentation 68undo change 52version info 50Version Info tab 16, 41

Rread-only

model 99reference

create 13

refresh project 253refresh source code 234regular expression for text search 51related diagram 118

add 118open 119

related object deletion 192Remove All Formats 166rename

BPM 101CDM 101entity 192FEM 101folder 39ILM 101object 191object in the Model Explorer 173OOM 101paste 191PDM 101RQM 101XSM 101

replicaoption 67

replicationdrag and drop 186

report 2editor 5Model Explorer 37

report languageresource 153

report templateeditor 5resource 153

repository 5requirement

attached to an object 46external shortcut 46open shortcut property sheet 46open target object property sheet 46

resourceconversion table 153DBMS 153extended model definition 153object language 153process language 153profile 153

285

Page 294: Eclipse plugin userguide

Index

report language 153report template 153XML language 153

resource editorcategory 154define 154entry 154toolbar 154use 154

resource fileadd extended object and link 183backup 154code naming conventions 140, 145extended object and link 183open 155

return mobile license 83row

add in a list 55automatic insertion option 69insert with ctrl+n 69insert with down arrow 69

RQB 99RQM

close 101create 10, 96define 10, 96delete 101extended model definition 224namespace 108new 224open 98property 103rename 101save 99save all 100

RTF editoropen RTF file 167open text file 167remove format 166toolbar 166

Ssave

binary 99BPM 99CDM 99diagram 119

FEM 99ILM 99model 99named path 72OOM 99package 21, 108PDM 99property sheet 52RQM 99XML 99XSM 99

save allBPM 100CDM 100FEM 100ILM 100model 100OOM 100PDM 100RQM 100XSM 100

Save As command 99Save As New Model command 99save perspective 4save selection 59script

text editor 69select

all list items 54diagram 112item in list 59show symbol 114type of license 88

selectionconfirm 59, 61save 59type 59

selection listadd items 59type 59

selection tree 62send a model 106served floating license 82served license 80, 81shift

open shortcut property sheet 68shortcut

286

Page 295: Eclipse plugin userguide

Index

create 190dependencies 47display in object type list 17, 54drag and drop 186find 202option 67paste 189property sheet open mode 68symbol 189tool 55

show symboladd objects 114create symbol 114delete symbol 114drag and drop 114feature 114hide symbol 114in diagram 113paste as shortcut 114select symbols 114

show view 4single line tab 68single property sheet 68sort general option 67spamfilter 86SPDC 86

subscribenet.com 86specific extended model definition 219, 222specific tab 176spell checker 75, 147

add to custom dictionary 147check children 147code page 147custom dictionary 147enable 147general option 147MS Word 147options 147

standalone seatlocal license 81served license 81

stereotype 48extended dependencies 48identify in the Model Explorer 8property 215

sub-package tool 55subscribenet.com 86

Sybase Product Download Center 86, 89subscribenet.com 86

symboldelete 192display 113, 114edit in place 172extended dependencies 49hidden 113, 114show in diagram 113show symbol 114show symbols 114

synchronizationactivate synchronization 228deactivate synchronization 235example 231merge models automatically 237

synonymgraphical synonym 198

sysam.properties 84system add-in 77

Ttab

buttons 68define 42favorite 42multi-line 68property sheet 68single line 68

targetgeneration 104paste 188

target modelopen 55

task for generation 104TCP port number 91template 10, 96, 210template for naming conventions 132text editor

code 69file object 69notes 69options 69scripts 69

toolcomposite objects 55create object 55

287

Page 296: Eclipse plugin userguide

Index

in the list toolbar 55open diagram 55open model 55shortcut 55sub-package 55

toolbarresource editor 154RTF editor 166

transformationadd in menu 151apply 151command 151enable 149execution order during generation 150generate 149inter model generation 149select generation 150

tree viewcopy 187diagram 112drag and drop 186paste 188

trialexpiration 84extension 80, 84, 87version 80vs regular license 80

troubleshooting license management 84typographic conventions vi

Uundo 67unresolved

named path 72un-served license 81URL properties 215use parent namespace 108, 109user add-in 77

Vvalidate model 124variable option 70VB .NET

artifacts 207VB .NET artifacts 207verify .ecore files 261version info

creation date 50creation user 50modification date 50modification user 50origin object 50property sheet 50

version of Eclipse 246version of model 10, 103view

model explorer 2modeling output 2navigator 2outline 235select diagram 112

Wwarning 126Web key 86wildcard

filter 65find 202

windowPowerDesigner 5

window menucustomize perspective 4save perspective 4show view 4

with confirmation deletion 67without confirmation deletion 67word wrap

code 172name 172

workspaceimport project 253refresh project 253

XXEM 219XMI file

export 156, 157exported objects 156, 157import 156save as XML 156

XMI save as XML 157XML

add-in 74export 157

288

Page 297: Eclipse plugin userguide

Index

import 156save 99Validation 75

XML languageresource 153

XSB 99XSM

close 101create 10, 96define 10, 96namespace 108object 162object identification 191open 98property 103rename 101save 99save all 100select extended model definition 224

289