СУБД Oracle / Литература / PowerDesigner 9 / GeneralFeatures
.pdf&KDSWHU 0DQDJLQJ 2EMHFWV
3UHYLHZLQJ WKH FRGH RI DQ REMHFW
You can preview the code of an object in order to see its generated code by clicking the Preview tab in the object property sheet.
It is a quick and easy way to apply modifications to your code and update the model.
You can use the following tools and accelerators from the Preview toolbar:
7RRO |
'HVFULSWLRQ |
$FFHOHUDWRU |
|
Open Editor Contextual Menu |
SHIFT + F11 |
|
Edit With contextual menu. This allows you to |
CTRL + E |
|
||
|
select an editor for the script |
|
|
Refresh |
F5 |
|
||
|
Select generation targets. This tool is available |
CTRL + F6 |
|
||
|
when at least one extended model definition |
|
|
flagged for generation is linked to the model and |
|
|
when it contains GeneratedFiles entries for the |
|
|
current object. When available, it displays the list |
|
|
of targets for the current object. If you add a |
|
|
generation target, the corresponding tab is added to |
|
|
the Preview page. If you deselect a generation |
|
|
target, the corresponding tab disappears from the |
|
|
Preview page |
|
|
Show generation options. If you select the Show |
CTRL + W |
|
||
|
Generation Options tool when available, the |
|
|
Generation Options dialog box appears. You can |
|
|
change generation options from this dialog box and |
|
|
see the impact on the code |
|
|
Ignore generation options. If you click the Ignore |
CTRL + D |
|
||
|
Generation Options tool when available, the |
|
|
preview ignores generation options selected by |
|
|
using the Show generation options tool but uses a |
|
|
predefined set of options |
|
|
|
|
For more information on previewing the code of a class or an interface
in the OOM, see section Previewing the code of a class or an interface in chapter Building a Class Diagram in the 220 8VHU V *XLGH.
General Features Guide |
|
'HILQLQJ REMHFWV
Script bookmarks In the Preview page, you can add and remove bookmarks at specific points in the code and then navigate forwards or backwards from bookmark to bookmark:
$FFHOHUDWRU 'HVFULSWLRQ
CTRL + F2 Adds a new bookmark. A blue bookmark box appears. If you repeat this action from the same position, the bookmark is deleted and the blue marker disappears
F2 |
Jumps to bookmark |
|
|
SHIFT + F2 Jumps to previous bookmark
Note that bookmarks are not printable and are lost if you use the Refresh, or
Show Generation tools.
For more information on how the Preview page is used in the OOM, see chapter Building a class diagram in the 220 8VHU V *XLGH.
For more information on how the Preview page is used in the PDM, see chapter Building physical diagrams in the 3'0 8VHU V *XLGH.
ϖ7R SUHYLHZ WKH FRGH RI DQ REMHFW
1 Double-click an object in the diagram to display its property sheet. 2 Click the Preview tab to display the corresponding page.
|
PowerDesigner |
&KDSWHU 0DQDJLQJ 2EMHFWV
3 Click OK.
General Features Guide |
|
'UDJJLQJ DQG GURSSLQJ REMHFWV
'UDJJLQJ DQG GURSSLQJ REMHFWV
Objects in the PowerDesigner working environment are easy to manipulate and to reuse from one model or package to another.
PowerDesigner fully supports the drag and drop standard manipulation feature.
You can drag and drop objects to copy, move or create a shortcut in the
PowerDesigner modeling environment.
'UDJ DQG GURS GHIDXOW DFWLRQ
The drag and drop feature follows the standard Windows rules:
8VHG NH\V |
$FWLRQ |
|
SHIFT + Drag and drop |
Move |
|
CTRL + Drag and drop |
Copy |
|
SHIFT + CTRL + Drag |
Shortcut creation |
|
and drop |
|
|
SHIFT + ALT + Drag and |
Replication creation |
|
drop |
|
|
|
|
5LJKW PRXVH EXWWRQ GUDJ DQG GURS
If you select an object in the diagram then click the right-mouse button while dragging and dropping the object to another location then release the right mouse button, you open a contextual menu that gathers all available actions for the object using drag and drop.
0RGLI\LQJ WKH GUDJ DQG GURS GHIDXOW DFWLRQ
You can modify the default drag and drop behavior from the Options dialog box.
ϖ7R PRGLI\ WKH GHIDXOW GUDJ DQG GURS EHKDYLRU
1Select Tools→General Options to open the General Options dialog box. The General category is selected by default.
|
PowerDesigner |
&KDSWHU 0DQDJLQJ 2EMHFWV
2 Select a default action radio button in the Drag & Drop box.
3 Click OK.
8VLQJ WKH GUDJ DQG GURS IHDWXUH
You can drag and drop items between the following PowerDesigner interface components:
2ULJLQ |
$OORZHG WDUJHW LQWHUIDFH FRPSRQHQWV |
|
Browser tree |
Browser tree view |
|
view |
Diagram window |
|
Diagram |
Diagram window |
|
window |
Browser tree view |
|
Result list |
Diagram window |
|
Browser tree view |
||
|
You can drag and drop items from the Result list to all the other interface components, but you cannot drag and drop items to the Result list.
General Features Guide |
|
&RS\LQJ REMHFWV
&RS\LQJ REMHFWV
When you copy an object, you put its entire definition in the Clipboard.
The definition of an object includes not only its properties but also the properties of its related objects. For example, if you copy a CDM entity, you also copy the attributes and business rules attached to that entity.
6HOHFWLQJ REMHFW WR FRS\
You copy objects from the following sources:
♦The Browser tree view
♦A diagram
♦A list of objects
♦The Result List
&RS\LQJ REMHFWV WR WKH &OLSERDUG
You can copy an object to the Clipboard using different methods and accelerators.
ϖ7R FRS\ D VHOHFWHG REMHFW WR WKH &OLSERDUG
♦Select Edit→Copy from the PowerDesigner menu bar.
RU
Press CTRL + C on the keyboard.
RU
Right-click and select Edit→Copy from the contextual menu of the
object.
RU
Open a list of objects, select one or several lines in the list and Press CTRL + C on the keyboard.
|
PowerDesigner |
&KDSWHU 0DQDJLQJ 2EMHFWV
3DVWLQJ REMHFWV
When you paste an object in PowerDesigner, you transfer its entire definition from the Clipboard and create a new object, not a graphical synonym nor an instance of the previously copied object.
6HOHFWLQJ D SDVWH WDUJHW
When you copy an object, the information stored in the Clipboard allows you to:
3DVWH WKH REMHFW LQ 3RZHU'HVLJQHU In this case you reuse the entire definition of the object.
3DVWH WKH REMHFW LQ DQ H[WHUQDO DSSOLFDWLRQ In this case, the pasted information allows you to produce the following result:
&RSLHG LWHP |
3DVWH UHVXOW |
|
Diagram symbol |
Image of the symbol (MS Word, PaintBrush) |
|
List item from an |
List in CSV format (MS Word, Excel) |
|
object list |
|
|
Item from the |
List in CSV format (Excel) |
|
Check Result list |
|
|
Item from the |
List in CSV format (Excel) |
|
Find Result list |
|
|
|
|
3DVWLQJ DQ REMHFW IURP WKH &OLSERDUG
When you paste an object, you transfer its definition from the Clipboard to place it in a selected target window. You can paste objects into the following PowerDesigner targets:
♦A container node (folder, model or package) in the Browser tree view
♦A diagram
♦A list of objects
General Features Guide |
|
3DVWLQJ REMHFWV
ϖ7R SDVWH DQ REMHFW IURP WKH &OLSERDUG
♦Select Edit→Paste from the PowerDesigner menu bar.
RU
Press CTRL + V on the keyboard.
RU
Right-click and select Edit→Paste from the contextual menu of an
object.
RU
Open a list of objects, select a line in the list and Press CTRL + V on the keyboard.
'UDJ DQG GURS CTRL
When you hold down the CTRL key during a drag and drop operation, you obtain the same result as a copy/paste operation.
3DVWLQJ D VKRUWFXW
You can copy a shortcut and paste it in another model or package, the result is a shortcut with the same properties as the original shortcut.
You can paste a shortcut into the following PowerDesigner targets:
♦The Browser tree view
♦A diagram
|
For more information on shortcuts, see chapter Managing Shortcuts. |
||
Pasting in a |
When you paste a shortcut into a diagram the result is the following: |
||
diagram |
6KRUWFXW VRXUFH |
|
3DVWH UHVXOW |
|
|
||
|
Same model or package |
|
New graphical synonym of shortcut |
|
Same diagram |
|
|
|
Same model or package |
|
New shortcut symbol or graphical synonym |
|
|
||
|
Different diagram |
|
|
|
Different model or package |
|
If the shortcut does not exist, a shortcut with its |
|
|
||
|
|
|
symbol are created |
|
|
|
If the shortcut already exists without a symbol, |
|
|
|
symbol is created |
|
|
|
If a shortcut and a symbol already exist, a |
|
|
|
graphical synonym is created |
|
PowerDesigner |
&KDSWHU 0DQDJLQJ 2EMHFWV
ϖ7R SDVWH D VKRUWFXW
♦ Select Edit→Paste.
'LVDEOHG SDVWH
You cannot paste a shortcut in a model or a package where the same shortcut already exists.
3DVWLQJ DQ REMHFW DV D VKRUWFXW
When you copy an object you can also paste it as a shortcut in a referencing model or package.
For more information on shortcuts, see chapter Managing Shortcuts.
You can paste an object as a shortcut into:
♦The Browser tree view
♦A diagram
The paste as shortcut feature works according to the following rules:
|
,I D VKRUWFXW DOUHDG\ |
,I D VKRUWFXW GRHV |
|
3DVWH GHVWLQDWLRQ |
H[LVWV |
QRW H[LVW |
|
Browser tree view |
Nothing happens |
Shortcut created |
|
List of objects |
|
|
|
Same model or package |
Nothing happens |
Nothing happens |
|
but different diagram |
|
|
|
Same model or package |
Nothing happens |
Nothing happens |
|
and same diagram |
|
|
|
Different model or |
Symbol created if there was |
Shortcut + symbol |
|
package |
no symbol |
created |
|
|
Graphical synonym created if |
|
|
|
symbol already existed |
|
ϖ7R SDVWH DQ REMHFW DV D VKRUWFXW
♦Select Edit→Paste As Shortcut.
RU
Right-click the Browser target or the diagram window and select Edit→Paste As Shortcut from the contextual menu.
General Features Guide |
|
3DVWLQJ REMHFWV
'UDJ DQG GURS CTRL+SHIFT
When you hold down the CTRL and SHIFT keys during a drag and drop operation, you obtain the same result as a paste as shortcut operation.
0DQDJLQJ SDVWH FRQIOLFWV
When you paste an object in PowerDesigner, checks are applied in order to verify that no conflict occurs between the identifying properties of the objects. The identifying criteria depends on the type of object, for some objects the identifying property is just the code, for other objects, identifying properties are the name and the code.
For more information about the identifying properties of an object, see section Identifying objects.
When a paste conflict occurs, PowerDesigner automatically renames the name and/or the code of the object in the following way:
6RXUFH REMHFW |
)LUVW UHQDPLQJ |
6HFRQG UHQDPLQJ |
|
Name |
Name2 |
Name3 |
|
CODE |
CODE2 |
CODE3 |
|
|
|
|
A message appears in the Output window to warn you that the object was renamed.
Renaming an entity When a paste conflict occurs on a CDM entity, the entity is renamed according to the data item options set in the model.
|
'DWD LWHP RSWLRQV |
5HVXOW RI FRS\LQJ DQ HQWLW\ |
|
Unique Code |
New entity with new name and code |
|
Allow Reuse |
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 |
|
PowerDesigner |