文档详情

PowerDesigner常见问题解决(一).docx

发布:2016-11-16约2.4千字共9页下载文档
文本预览下载声明
1、PowerDesigner中设置name与code的联动 在powerdesign中,code与name默认是联动的,即:修改了name中的数据,code随之修改,令人感觉很讨厌。解决方法是:选择“工具”中的“常规选项…”,打开 “General Options”,选择“Dialog”,将Name to Code mirroring改为不选中,问题即可解决 ,具体见下图: 2、PowerDesigner 反转Java代码生成类图: 第一步:先建立对象模型: 第二步:选择对象反向工程的菜单: 第三步:选择需要逆向工程的java类 点击确定: 反向工程生成的类图如下: 3、将所有java的VO对象的属性的Name作为注释 第一步,打开脚本执行窗口: 第二步,执行如下的脚本: Option Explicit Get the current active model Dim Model Set Model = ActiveModel If (Model Is Nothing) Or (Not Model.IsKindOf(PdOOM.cls_Model)) Then MsgBox The current model is not an OOM model. Else Get the Classes collection Dim ModelClasses Set ModelClasses = Model.Classes Output The model + Model.Name + contains + CStr(ModelClasses.Count) + classes. Output ShowProperties Model End If Sub ShowProperties(package) Show classes of the current model/package Dim noClass noClass = 1 For each class Dim cls For Each cls In package.Classes ShowClass cls, noClass noClass = noClass + 1 Next Show classes in the sub-packages Dim subpackage For Each subpackage In package.Packages If Not subpackage.IsShortcut Then ShowProperties subpackage ElseIf Not subpackage.External Then Accept internal shortcut of packages ShowProperties subpackage End If Next End Sub Sub ShowClass(cls, noClass) If IsObject(cls) Then Dim bShortcutClosed bShortcutClosed = false If cls.IsShortcut Then If Not (cls.TargetObject Is Nothing) Then Show properties of the target class Set cls = cls.TargetObject Else The target model is not opened (closed or not found) bShortcutClosed = true End If End If Show properties If Not bShortcutClosed Then ShowAttributes cls Else Output The target class of the shortcut + cls.Code + is not accessible. Output End If End If End Sub
显示全部
相似文档