Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
42
Добавлен:
16.04.2013
Размер:
3.34 Mб
Скачать

&KDSWHU 0DQDJLQJ 2EMHFWV

2 Select the Delete Objects radio button.

3 Click OK.

'HOHWLQJ DQ REMHFW LQ D OLVW

You can delete an object in a list, in this case you do not have to confirm the deletion.

To cancel the deletion, you have to click Cancel in the list or use the Undo feature.

ϖ7R GHOHWH DQ REMHFW LQ D OLVW

1 Select a list item from the Model menu.

2 Click an item in the list.

An arrow appears at the beginning of the line. 3 Click the Delete button.

4 Click OK.

'HOHWLQJ D IUHH V\PERO

Texts, Lines, Arcs, Rectangles, Ellipses, Rounded Rectangles, Link Symbols, Polylines and Polygons are free symbols, they do not have an associated object.

When you delete a free symbol, there is no confirmation message.

ϖ7R GHOHWH D IUHH V\PERO IURP WKH GLDJUDP ZLQGRZ

Select the Delete tool in the Palette and click the free symbol in the diagram window.

The free symbol disappears.

General Features Guide

 

8VLQJ ILOH REMHFWV

8VLQJ ILOH REMHFWV

A file object is a graphical representation of a Windows supported file that you can use for documentation purposes within your model.

You can attach any PowerDesigner object to a file object for documenting collaboration between objects in your model.

A file object always belongs to a package unlike external files that you add to the workspace. However, when you double-click on each of them you open their associated application.

For more information on adding an external file to a workspace, see section Adding items to a workspace in chapter Managing the workspace.

A file object can be any file supported by Windows: Java file, script SQL, or

MS Word file.

A file object can be external to the model or embedded to it.

You can use a file object for different purposes in PowerDesigner. For example you can:

Attach a file object to a PowerDesigner object to enrich its description

Attach a generated OOM class to a target Java file

)LOH REMHFW SURSHUWLHV

You can access file objects properties from the list of files or by opening the contextual menu of a file object in the diagram.

All file objects share the following common properties:

 

3URSHUW\

 

'HVFULSWLRQ

 

 

Name

 

Name that you assign to the file object that clearly

 

 

 

identifies it during the design process

 

Code

 

Reference name of the file object

 

 

 

Comment

 

Descriptive label for the file object

 

 

 

Stereotype

 

User-defined values derived from existing file objects but

 

 

 

 

 

specific to your needs. They let you extend the semantics

 

 

 

of a file object without changing its structure

 

Location type

 

Indicates whether the file object is stored within the model

 

 

 

(Embedded,

 

(Embedded), or externally (MS Word file, URL, etc.)

 

External or URL)

 

 

 

 

 

PowerDesigner

 

 

 

 

&KDSWHU 0DQDJLQJ 2EMHFWV

 

 

 

 

 

 

3URSHUW\

 

'HVFULSWLRQ

 

 

 

 

Location

 

Actual place where the file is stored (grayed when the file

 

 

 

object is embedded)

 

Extension

 

Extension of the file object name that indicates the

 

 

 

 

 

application to open when the file object is embedded

 

Generate

 

File object is automatically included among the objects

 

 

 

 

 

generated from the model when you launch the intermodel

 

 

 

generation process

 

Artifact

 

Designates the file object as an integrated part of the

 

 

 

 

 

application

Modify or create

 

 

 

You can type stereotypes directly in the Stereotype column of the object

new stereotypes

property sheet or select a value from the dropdown listbox if you have

 

previously defined stereotypes in an embedded or imported extended model

 

definition (.XEM).

 

 

 

For more information on extended model definitions, see section Working with extended model definitions.

/RFDWLRQ W\SHV

The following location types are available :

/RFDWLRQ

 

7\SH

'HVFULSWLRQ

Embedded

When a file object is embedded,

 

it is stored within the model.

 

You save it when you save the

 

model. At creation, a file object

 

is always embedded and has a

 

default name with a .TXT

 

extension that appears in the

 

Extension box of its property

 

sheet

External

When a file object is external, it

 

is not stored within the model.

 

It represents in your model a

 

reference for a file that you

 

access on your disk or via a

 

given drive

 

 

/RFDWLRQ ER[

The Location box is grayed as there is no need to define a location

The Location box must be filled with the appropriate file path (for example D:\MyModel\File_1.txt) by browsing for the required file in the standard Open dialog box that appears

General Features Guide

 

8VLQJ ILOH REMHFWV

/RFDWLRQ

 

7\SH

'HVFULSWLRQ

URL

When a file object is an URL, it

 

is not stored within the model.

 

It represents in your model a

 

reference for a file that you

 

access using a Web address

 

 

/RFDWLRQ ER[

The Location box must be filled with the appropriate URL path (for example http://www.Sybase.com)

$UWLIDFW

When a file object is an artifact, it is no more used for documentation purposes as a reference to a file, but becomes an integrated part in the application design.

If an artifact has an extension that corresponds to an extension defined in the

Extension column of the Editors page in the General Options dialog box together with the LQWHUQDO! keyword defined in both the Editor Name and

Editor Command columns of the same page, a Contents tab appears in the artifact property sheet. The Contents page allows you to edit the artifact file directly in the internal text editor of PowerDesigner.

From the internal text editor toolbar, you can use the following tools and accelerators:

7RRO

'HVFULSWLRQ

$FFHOHUDWRU

 

Open Editor Contextual Menu

SHIFT + F11

 

Edit With. Opens the default editor you

CTRL + E

 

 

previously defined or allows you to select

 

 

another editor if you click the down arrow

 

 

beside this tool

 

 

 

 

For more information on the use of artifact files, see section Defining

file objects in a deployment diagram in chapter Building a Deployment Diagram of the 220 8VHU V JXLGH.

For more information on defining text editors, see section Defining a text editor in chapter Using the PowerDesigner interface.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

&UHDWLQJ D ILOH REMHFW

There are several ways to create a file object:

From a diagram

From the Browser

From the list of files

At creation, a file object is embedded by default within the model and has a default name including a number. This number is assigned in the order of creation of objects.

For more information on the different ways to create a file object, see section Creating an object.

You can also create a file object from the contextual menu of a symbol in the diagram.

For more information, see section Attaching a file object to a PowerDesigner object.

'UDJ DQG GURS IURP WKH :LQGRZV ([SORUHU

You can easily create an external file within your PowerDesigner model by dragging and dropping a file from the Windows Explorer to your PowerDesigner model.

ϖ7R FUHDWH D ILOH REMHFW IURP D GLDJUDP

1 Click the File tool in the Palette.

2 Click an empty space in the diagram to display the following symbol at the click position.

3 Click the Pointer tool.

RU

Click the right mouse button to release the File tool.

4Right-click the new file object symbol in the diagram and select properties from the contextual menu to display the file object property sheet.

5Type a file object name.

6(Optional) Type a stereotype.

General Features Guide

 

8VLQJ ILOH REMHFWV

7(Optional) Select a Location Type, if you want to define the file object externally, otherwise the file object is embedded by default.

8(Optional) Browse to the directory that contains the external file in the

Location box, if you clicked the External File radio button.

RU

(Optional) Type the Web address to access the file on a web site, if you have clicked the URL radio button.

9Type an extension.

10 Click OK.

0RGLI\LQJ WKH SURSHUWLHV RI D ILOH REMHFW

By default, at creation, the file object is embedded within the model but you can modify that property and change the file object into an external file or an URL.

For more information on Location Types, see section File object properties.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

You can modify the file object properties using the following methods:

From the file object property sheet

From the list of files

For more information on the different ways to modify the file object properties, see section Modifying object properties.

Location type

When you modify the Location Type property of a file object that has a

 

content, the following can occur depending on the initial location type of the

 

file object:

 

 

 

 

 

 

)LOH REMHFW ZDV

 

<RX UHGHILQH LW DV

 

:KDW KDSSHQV

 

 

 

 

 

An external file

 

An embedded file

 

When you click OK in the

 

 

 

 

 

file object property sheet, a

 

 

 

 

 

confirmation box asks you

 

 

 

 

 

if you want to copy the

 

 

 

 

 

content of the external file

 

 

 

 

 

into the embedded file.

 

 

 

 

 

Click Yes if you want to

 

 

 

 

 

preserve the external file

 

 

 

 

 

content, otherwise click No,

 

 

 

 

 

the external file content will

 

 

 

 

 

be lost but the extension file

 

 

 

 

 

will be kept and will appear

 

 

 

 

 

in the Extension box

 

An embedded file

 

An external file

 

A confirmation box asks

 

 

 

 

 

 

 

 

you if you want to copy the

 

 

 

 

 

embedded file content in

 

 

 

 

 

the external file. Click Yes

 

 

 

 

 

then type a filename in the

 

 

 

 

 

Save As dialog box that

 

 

 

 

 

appears, and click Save.

 

 

 

 

 

Otherwise click No then

 

 

 

 

 

browse for an existing file

 

 

 

 

 

in the Open dialog box that

 

 

 

 

 

appears, and click Open. In

 

 

 

 

 

both cases, the Location and

 

 

 

 

 

the Extension boxes change

 

 

 

 

 

accordingly

 

An embedded file

 

An URL

 

A confirmation box warns

 

 

 

 

 

 

 

 

you that the embedded file

 

 

 

 

 

content will be lost

 

 

 

 

 

 

 

General Features Guide

 

8VLQJ ILOH REMHFWV

2SHQLQJ DQ H[LVWLQJ ILOH REMHFW

The file object symbol is a graphical representation of a Windows supported file in a model.

When you create a file object, you first create a graphical symbol and an object, then you can open it in order to start working with the associated application.

You can define text editors for the extensions of your file objects in the General Options dialog box.

For more information on defining text editors, see section Defining a text editor in chapter Using the PowerDesigner interface.

When you work with an embedded object file, the content of the file is stored into a temporary file while the associated application opens. Each time you save your file in the associated application, its content is automatically copied from the temporary file into your PowerDesigner model. If you rename your file in the associated application, PowerDesigner will not be able to recognize your file and its content will not be copied into your model.

ϖ7R RSHQ DQ H[LVWLQJ ILOH REMHFW

Double-click the file object node in the Browser tree view.

RU

Double-click the file object symbol in the diagram.

The application associated with the file object extension opens. If the file object extension has no association in Windows, a standard Open With dialog box opens that lets you select the application you want to open the file object.

2SHQLQJ D ILOH REMHFW IURP WKH /LVW RI )LOHV

You can also open a file object from the List of Files by selecting a file object in the list, and select the Open File tool.

6HOHFWLQJ DQ DSSOLFDWLRQ SURJUDP IRU D ILOH REMHFW

The file object is created by default with a .TXT extension and opens in the associated application. Usually Notepad, it can also be another application if you have defined another default text editor in PowerDesigner general options for that file extension. The first editor you define becomes the default editor since the list of editors is not sorted.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

You can associate other application programs with the extension of the file object directly from its contextual menu. Thus, you can easily switch from one application program to another for the same file object.

When you select an application program, it is automatically displayed in the file object contextual menu as a new sub-entry, and also in the list of editors in the General Options dialog box.

ϖ7R VHOHFW DQ DSSOLFDWLRQ SURJUDP IRU D ILOH REMHFW

1Right-click a file object and selectOpen WithChoose Program from the contextual menu.

A standard Open dialog box appears.

2Browse to the directory that contains the program file you want and select it.

3Click Open.

The file object automatically opens in the associated application program.

$WWDFKLQJ D ILOH REMHFW WR D 3RZHU'HVLJQHU REMHFW

If you want to document the model objects, you can attach one or more file objects to any PowerDesigner objects that support extended dependencies.

You do this by creating a link between them, which is called an extended dependency.

For more information on extended dependencies, see section Displaying object dependencies in chapter Using the PowerDesigner Interface.

There are several ways to attach a file object to a PowerDesigner object:

Graphically from the diagram window using the Link/Extended Dependency tool from the Palette

From the Extended Dependencies tab of the PowerDesigner object property sheet

From the contextual menu of the PowerDesigner object symbol

Whatever the method used, the attachement between both objects is showed:

Graphically in the diagram

In the Dependencies tab in the influent object property sheet and in the Extended Dependencies tab in the dependent object property sheet

General Features Guide

 

8VLQJ ILOH REMHFWV

In the contextual menu of the PowerDesigner object symbol

Each time you attach a file object to a PowerDesigner object, the file object name appears in the contextual menu of the PowerDesigner object symbol. You can then select the file name to directly open it.

$WWDFKLQJ D ILOH REMHFW WR D 3RZHU'HVLJQHU REMHFW XVLQJ WKH /LQN ([WHQGHG 'HSHQGHQF\ WRRO

You can attach a file object to a PowerDesigner object using the

Link/Extended Dependency tool in the palette.

ϖ7R DWWDFK D ILOH REMHFW WR D 3RZHU'HVLJQHU REMHFW XVLQJ WKH /LQN ([WHQGHG 'HSHQGHQF\ WRRO

1 Select the Link/Extended dependency tool in the Palette.

2 Click inside the file object symbol in the diagram, and while continuing to hold down the mouse button, drag and drop the cursor to the PowerDesigner object symbol. Release the mouse button.

$WWDFKLQJ D ILOH REMHFW WR D 3RZHU'HVLJQHU REMHFW XVLQJ WKH 3RZHU'HVLJQHU REMHFW SURSHUW\ VKHHW

You can attach a file object to a PowerDesigner object using the Extended

Dependencies page in the PowerDesigner object property sheet.

ϖ7R DWWDFK D ILOH REMHFW WR D 3RZHU'HVLJQHU REMHFW XVLQJ WKH 3RZHU'HVLJQHU REMHFW SURSHUW\ VKHHW

1 Double-click a PowerDesigner object to open its property sheet.

2 Click the Extended Dependencies tab to display the corresponding page. 3 Click the Add Objects tool to display the corresponding dialog box.

4 Select a model from the Model dropdown listbox.

5 Select a package from the Package dropdown listbox.

6 Click the File tab in the lower part of the Add Objects dialog box to display the corresponding page.

7Select the check box that corresponds to the file object you want to attach and click OK.

The file object symbol automatically appears in the diagram linked with an extended dependency to the PowerDesigner object symbol.

 

PowerDesigner

Соседние файлы в папке PowerDesigner 9