简体   繁体   English

Visual Studio UML建模项目-版本控制以及如何搜索模型?

[英]Visual Studio UML Modeling Projects - Version control and how to search the model?

Sorry for the bad title, and the somewhat different questions! 对不起,标题不好,还有一些不同的问题!

I have been searching the web and SO for these (trivial) question, but I seam to drown in MSDN pages (some are great!). 我一直在网上搜索这些(琐碎的)问题,但是我想淹没在MSDN页面中(有些很棒!)。 The tool I'm used to for UML design is Enterprise Architecture, so my questions is kind of related to how EA works. 我用于UML设计的工具是企业体系结构,所以我的问题有点类似于EA的工作方式。

I have three questions: (1) Version control and shared model for large projects. 我有三个问题:(1)大型项目的版本控制和共享模型。 Is it possible the have the model in a shared database. 是否可以在共享数据库中拥有模型。 Having it in TFS under source control seems like problems with people working in the same packages. 在源代码管理下将其包含在TFS中似乎是使用相同软件包的人员的问题。

(2) How do I search the UML model in Visual Studio? (2)如何在Visual Studio中搜索UML模型? I want to be able to find in what diagrams a specific class is used in and so on... How to query the model? 我希望能够找到在哪个图中使用了特定的类,依此类推...如何查询模型?

(3) In a sequence diagram is the messages just plain text. (3)在序列图中,消息只是纯文本。 Can I connect them to an operation? 我可以将它们连接到手术吗?

Thanks! 谢谢!

Cheers --Jocke 干杯-乔克

For sharing models in TFS, see Managing Models and Graphs Under Version Control . 要在TFS中共享模型,请参见在版本控制下管理模型和图形

If you use CTRL+F to search your solution, you should get a list of all the diagrams that have a specific element. 如果使用CTRL + F搜索解决方案,则应获取所有包含特定元素的图的列表。

You can connect messages to operations on a class diagram, but you have to bind the lifeline to a type. 您可以将消息连接到类图上的操作,但是必须将生命线绑定到类型。 This also makes the signature visible and lets you edit it: 这也使签名可见,并允许您对其进行编辑:

Select the lifeline and press F4. 选择生命线,然后按F4。 In the Properties window, set the Type property to an existing type or enter a name for a new type. 在“ 属性”窗口中,将“ 类型”属性设置为现有类型,或输入新类型的名称。 Right-click the message label. 右键单击消息标签。 Choose Create Operation . 选择创建工序

-or- -要么-

Right-click the lifeline. 右键单击生命线。 Choose Create Class . 选择创建类

See UML Sequence Diagrams: Guidelines . 请参阅《 UML序列图:指南》

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM