简体   繁体   English

visio 中的通用 UML 数据类型不是特定于语言的?

[英]General UML datatypes in visio not language specific?

When making a UML Classdiagram in Visio.在 Visio 中制作 UML 类图时。 it's only giving C#,C,VB Datatypes.它只提供 C#、C、VB 数据类型。 how can I add datatypes or change this so it is not language specific because I want to make a diagram for a JAVA application?我如何添加数据类型或更改它以便它不是特定于语言的,因为我想为 JAVA 应用程序制作图表?

This is a solution that works for Visio 2010 and should work for the newer versions.这是一个适用于Visio 2010的解决方案,应该适用于较新的版本。

You can make up your own package and data types.您可以组成自己的包和数据类型。

  1. First go to the Model Explorer tab on the left.首先转到左侧的 Model Explorer 选项卡。
  2. Then right-clicked on IDL Data Types and click Duplicate (since you don't want to make it from scratch and it pretty much has what you should want).然后右键单击 IDL Data Types 并单击 Duplicate(因为您不想从头开始制作它并且它几乎具有您想要的东西)。
  3. It will then make a new package called "Package 1".然后它会创建一个名为“Package 1”的新包。 Right-click on it and select Rename;右键单击它并选择重命名; something like “Java Data Types” since that is what you are making, but you can name it anything if you want.诸如“Java 数据类型”之类的东西,因为这就是您正在制作的内容,但是如果您愿意,您可以将其命名为任何名称。
  4. Then open the new package and right-click each data type, one at a time, and select Properties.然后打开新包并右键单击每个数据类型,一次一个,然后选择属性。
  5. Then it will open up the UML Property Editor.然后它将打开 UML 属性编辑器。 From there, click on Name, then remove the word “idl” from inside the brackets, so “boolean(idl)” now says ”boolean()”.从那里,单击名称,然后从括号内删除单词“idl”,因此“boolean(idl)”现在显示为“boolean()”。

Now, one other thing: There is no int data type, so you need to make one.现在,另一件事:没有 int 数据类型,因此您需要创建一个。 It is pretty easy;这很容易;

  1. Just right-click on your newly created folder, click New, then click Data Type.只需右键单击新创建的文件夹,单击新建,然后单击数据类型。 It should open the UML Datatypes Properties window.它应该打开 UML 数据类型属性窗口。
  2. Now, click inside the Name tab, type in “int()”, then click OK.现在,在“名称”选项卡内单击,输入“int()”,然后单击“确定”。 And you're all done.你已经完成了。

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

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