СУБД Oracle / Литература / PowerDesigner 9 / GeneralFeatures
.pdf&KDSWHU 0DQDJLQJ 2EMHFWV
The command appears as follows in the File menu:
ϖ7R GHILQH D FXVWRPL]HG FRPPDQG
1Select Tools→Execute Commands→Customize Commands to display the Customize Commands dialog box.
2Click a blank line in the list.
RU
Click the Add a row tool.
3Type a name for the command in the Name column.
4(Optional) Select a submenu from the dropdown listbox in the Submenu column.
5(Optional) Define a context by clicking the Ellipsis button in the Context column.
General Features Guide |
|
$FFHVVLQJ REMHFWV XVLQJ 9%6FULSW
6Select a type from the dropdown listbox in the Type column.
7Browse to the directory that contains the command file or argument in the Command Line column.
8(Optional) Type a comment in the Comment column.
9Select the Show in Menu check box to display the command name in the menu.
10(Optional) Select an accelerator key from the dropdown listbox in the Accelerator key column.
11Click OK.
You can see the command you have just defined by selecting
Tools→Execute Commands.
0RGLI\LQJ D FXVWRPL]HG FRPPDQG
You modify a customized command from the Customize Commands dialog box.
ϖ7R PRGLI\ D FXVWRPL]HG FRPPDQG
1Select Tools→Execute Commands→Customize Commands to display the Customize Commands dialog box.
2Modify the customized command definition.
3Click OK.
|
PowerDesigner |
&KDSWHU 0DQDJLQJ 2EMHFWV
0DQDJLQJ FXVWRPL]HG FRPPDQGV
|
Understanding how customized commands are stored in PowerDesigner V9 |
|
will allow you to easily plug your programs in PowerDesigner while |
|
installing them. |
Storage |
Customized Commands are saved in the Registry. You can define values for |
|
customized commands in the CURRENT USER Registry or in the LOCAL |
|
MACHINE Registry. |
|
If you define values in the LOCAL MACHINE Registry, customized |
|
commands are available for any user of the machine. Thus, when you remove |
|
a customized command defined in that Registry from the Customize |
|
Commands dialog box, you only remove the line from the list but not the |
|
corresponding Registry entry. When you do so, the default value (the one |
|
defined in the LOCAL MACHINE Registry) is restored when you open the |
|
dialog box again. |
The location of customized commands definition can be:
♦HKEY_CURRENT_USER\Software\Sybase\PowerDesigner 9\PlugInCommands
♦HKEY_LOCAL_MACHINE\Software\Sybase\PowerDesigner 9\PlugInCommands
Each customized command is stored in a single Registry string value:
♦The name of the customized command is a Registry entry, which has the same name as the command
♦The submenu of the customized command is a Registry key, which has the same name as the submenu
♦Other command properties are stored in the Value Data field of the Registry entry (Registry entry value)
Definition format |
The syntax of the Registry entry is the following: |
|
>+LGH @>.H\ NH\ VSHFLILFDWLRQ! @>6FULSW @ FRPPDQG!> _FRPPHQW@ |
General Features Guide |
|
$FFHVVLQJ REMHFWV XVLQJ 9%6FULSW
Note that none of the above quoted prefix is localized.
6\QWD[ .H\ZRUG |
'HVFULSWLRQ |
|
Hide: |
Defines the command as hidden |
|
Key:<key specification>: |
Allows the association of a keyboard accelerator to |
|
|
the command. This is an optional field. The <key |
|
|
specification> element can include the following |
|
|
optional prefixes in this order: |
|
|
♦ CTRL- for CONTROL flag |
|
|
♦ SHIFT- for SHIFT flag |
|
|
Immediately followed by a single character, |
|
|
included between "0-9" (for example:Ctrl-Shift- |
|
|
0) |
|
Script: |
Defines the command to be interpreted as an internal |
|
|
script |
|
<Command> |
Defines the filename with optional arguments for the |
|
|
command. The command is mandatory and is |
|
|
terminated by a ’|’ character. If you want to insert a ’|’ |
|
|
character within a command, you must double it |
|
Comment |
Describes the command. This is an optional field |
|
|
|
Note: The Customize Commands dialog box only supports "Ctrl-Shift-0" to "Ctrl-Shift-9" accelerators. If you define an accelerator outside that range, conflicts with some other built-in accelerators may occur and lead to unpredictable results. The reuse of the same keyboard accelerator for two distinct commands may also lead to unpredictable results.
|
PowerDesigner |
C H A P T E R 8
0DQDJLQJ 6KRUWFXWV
About this chapter |
This chapter describes the use of shortcuts in PowerDesigner. |
|
Contents |
7RSLF |
3DJH |
|
||
|
Defining a shortcut |
300 |
|
Displaying shortcuts |
315 |
|
Working with shortcuts |
320 |
|
Generating shortcuts |
331 |
General Features Guide |
|
'HILQLQJ D VKRUWFXW
'HILQLQJ D VKRUWFXW
|
PowerDesigner lets you reference objects among different models. |
6WDWLQJ WKH SUREOHP |
|
Update problem |
When you need to share an object between several models, you can duplicate |
|
it in the different models where it has to be used. However, when the |
|
definition of this shared object changes, it often raises update problems |
|
because it is not possible to guarantee that all copies of the duplicated object |
|
are synchronized. |
|
You end up with shared objects with different definitions. |
Reusability |
You may need to reuse the properties of some objects and make other objects |
problem |
inherit these properties. |
For example, let’s consider entity Person has four attributes: Name, Age,
Nationality and Address. When you create an inheritance link between
Person and Customer and Employee, both entities inherit the attributes of
Person.
Since you are likely to reuse Person in several other models, you can create libraries of reusable objects which properties are inherited by new objects in different models. However, it is impossible to guarantee that when you modify the definition of a reusable object, this change will also affect the children in all the different models.
PowerDesigner addresses both needs with the VKRUWFXW feature.
8QGHUVWDQGLQJ WKH VKRUWFXW FRQFHSW
In PowerDesigner, you can define objects referenced among several models. When you modify the definition of a shared object, all its occurrences called shortcuts, are updated in the different models.
A 6KRUWFXW is an object that represents and references a WDUJHW REMHFW in the
same model or in a different model or package. You create and store target objects in a special model or package called WDUJHW PRGHO. Usually, this
model or package is not a working model but rather a library of reusable
objects. You copy target objects from the target model, and paste them as shortcuts in a UHIHUHQFLQJ model or package.
|
PowerDesigner |
&KDSWHU 0DQDJLQJ 6KRUWFXWV
There are two types of shortcuts:
♦,QWHUQDO shortcuts are shortcuts existing between packages within a single model.
♦([WHUQDO shortcuts are shortcuts existing between different models.
Some PowerDesigner objects are JOREDO to the model, for example organization unit, or business rules. Therefore you cannot create internal shortcuts for these objects, only external shortcuts are allowed.
Using shortcuts means you do not have to duplicate objects and ensures object synchronization. The shortcut uses the name, code, type and Id of the target object and is automatically updated when the definition of the target object is modified.
To address the update problem, you can copy the target object and paste it as a shortcut in the different models where it is needed:
General Features Guide |
|
'HILQLQJ D VKRUWFXW
To address the reusability problem, you create a target object and reuse it in different models. Local objects will inherit the properties of the target object via its shortcut:
Which objects |
You can create internal and external shortcuts on any of the object types that |
||
support shortcuts? |
appear under a model diagram or package in the Browser tree view. |
||
|
You can also create shortcuts of shortcuts. |
||
|
The following objects do not support shortcuts or external shortcuts only: |
||
|
|
|
|
|
0RGHO |
6KRUWFXW QRW VXSSRUWHG |
([WHUQDO VKRUWFXW QRW VXSSRUWHG |
|
CDM |
— |
Data item |
|
OOM |
Start, end, decision, |
Message |
|
|||
|
|
synchronization, junction |
|
|
|
point, transition, state |
|
|
BPM |
Start, end, decision, |
Flow |
|
|||
|
|
synchronization, resource |
|
|
|
flow |
|
|
|
|
|
'DWD LWHP VKRUWFXWV
You can reuse data item shortcuts only if they are internal.
A duplicated data item shortcut has the same characteristics as the original data item shortcut.
|
PowerDesigner |
&KDSWHU 0DQDJLQJ 6KRUWFXWV
6KRUWFXW SURSHUWLHV
Shortcuts have the following properties:
3URSHUW\ |
'HVFULSWLRQ |
|
Target type |
Type of model and object type |
|
Target object |
Name and code of the target object. The Properties button |
|
(Name and Code) |
lets you open the target object property sheet |
|
Target model |
Name of the model to which the target object belongs. The |
|
|
Properties button lets you open the target model property |
|
|
sheet |
|
Target package |
Name and path of the package to which the target object |
|
|
belongs. The Properties button lets you open the target |
|
|
package property sheet or the model property sheet when |
|
|
there is no package |
|
Shortcut type |
Type of the shortcut, external or internal |
|
Status |
State of the target model which can be Closed or Opened or |
|
|
state of the shortcut which can be Not Found |
|
Object1 (link |
Name of the source object from which the link is dragged |
|
shortcut) |
|
|
Object2 (link |
Name of the target object towards which the link is dragged |
|
shortcut) |
|
|
Generate (external |
Shortcut is automatically included among the objects |
|
shortcut) |
generated from the model when you launch the generation |
|
|
process |
|
Generated as |
Shortcut is generated as object or as shortcut in the |
|
(external shortcut) |
generated model (Only available for external shortcuts). |
|
|
When you generate a shortcut as an object, it looses all |
|
|
links to the target model. When you generate a shortcut as a |
|
|
shortcut, it keeps its links to the target model during the |
|
|
generation process |
|
Change target |
Lets you change the target object of the shortcut |
|
object |
|
|
|
|
For more information on the Not Found status of a shortcut, see section Changing the target object.
General Features Guide |
|
'HILQLQJ D VKRUWFXW
A shortcut definition also includes the following properties:
3URSHUW\ |
'HVFULSWLRQ |
|
Dependencies |
Objects with which the shortcut collaborates |
|
Version Info |
Shortcut owner, modification and creation details |
|
|
|
For more information on the use of the Dependencies tab for a shortcut, see section Locating the dependent objects of a shortcut.
&UHDWLQJ D VKRUWFXW
There are two methods for creating shortcuts, you can:
♦Copy and paste an object as a shortcut
♦Use the drag and drop feature
You create a shortcut:
)URP |
7R |
|
Browser tree view |
Browser tree view |
|
|
Diagram window |
|
Diagram window |
Browser tree view |
|
|
Diagram window |
|
|
|
When you create a shortcut, you have to follow some rules:
♦You cannot create a shortcut in the target model or package
♦You cannot create a shortcut for a data item outside the current namespace
♦You cannot create more than one shortcut for a given target object in the same model or package
♦You cannot create links between two shortcuts, but you can keep the link between two target objects in the referencing model
♦You cannot create a link between an entity and the shortcut of an inheritance
For more information on links on shortcuts, see the section Linking shortcuts.
|
PowerDesigner |