有没有办法在 Visio for Java 中绘制 UML?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/442099/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a way to draw UML in Visio for Java?
提问by tomato
I have Visio2007 and I really like it. However, it doesn't seem to have UML model/datatypes for Java. Is there some template I can download for Java? Or should I just forget about Visio altogether and get an Elipse plugin?
我有 Visio2007,我真的很喜欢它。但是,它似乎没有用于 Java 的 UML 模型/数据类型。有没有我可以为 Java 下载的模板?或者我应该完全忘记 Visio 并获得一个 Elipse 插件?
Thanks!
谢谢!
采纳答案by Adeel Ansari
The latter is a better option, IMHO. Further, I don't think UML Models should be specific to Java. I am not aware of, if there are any java-specific UML, around.
后者是更好的选择,恕我直言。此外,我认为 UML 模型不应特定于 Java。我不知道周围是否有任何特定于 Java 的 UML。
I found this while searching over the net. UML Models: MS Visio 2007.
我在网上搜索时发现了这个。UML 模型:MS Visio 2007。
回答by Adeel Ansari
There is a Visio UML template for Java at http://barzeenotes.blogspot.com/2014/11/java-and-javascript-support-for.html
在http://barzeenotes.blogspot.com/2014/11/java-and-javascript-support-for.html 上有一个用于 Java 的 Visio UML 模板
回答by user276646
I had the same question, but then I messed around with it until I figured it out. Now, bear with me; this is the first time I have ever posted a response to an answer. Since I figured it out I thought I should transfer my brain's data into your brain (eww.. we're interfacing).
我有同样的问题,但后来我把它弄乱了,直到我弄明白了。现在,忍受我;这是我第一次发布对答案的回复。既然我想通了,我想我应该将我大脑的数据传输到你的大脑中(呃……我们正在接口)。
Now to business... You can actually make up your own package and data types. What I did was I went to the Model Explorer
tab on the left. Then, I right-clicked on IDL Data Types
, and then I clicked Duplicate
(since I didn't want to make my own from scratch and it pretty much has what I want). It will then make a new package called "Package 1". Right-click on it and select Rename
; I renamed mine to “Java Data Types” since that is what I am making, but you can name it “Underpants” if you want. Then, I opened my new package and right-clicked each data type, one at a time, and selected Properties
. Then it will open up the UML Property Editor
. From there, click on Name
, then remove the word “idl” from inside the brackets, so “boolean(idl)” now says ”boolean()”.
现在开始...您实际上可以组成自己的包和数据类型。我所做的是转到Model Explorer
左侧的选项卡。然后,我右键单击IDL Data Types
,然后单击Duplicate
(因为我不想从头开始制作自己的,而且它几乎有我想要的东西)。然后它会创建一个名为“Package 1”的新包。右键单击它并选择Rename
; 我将我的重命名为“Java 数据类型”,因为这是我正在制作的内容,但如果您愿意,您可以将其命名为“内裤”。然后,我打开我的新包并右键单击每个数据类型,一次一个,然后选择Properties
. 然后它会打开UML Property Editor
. 从那里,单击Name
,然后从括号内删除单词“idl”,因此“boolean(idl)”现在表示“boolean()”。
Now, one other thing: There is no int
data type, so you need to make one. It is pretty easy; just right-click on your newly created folder, click New
, then click Data Type
. It should open the UML Datatypes Properties
window. Now, click inside the Name
tab, type in “int()”, then click OK
. And you're all done.
现在,另一件事:没有int
数据类型,因此您需要创建一个。这很容易;只需右键单击新创建的文件夹,单击New
,然后单击Data Type
。它应该打开UML Datatypes Properties
窗户。现在,在Name
选项卡内部单击,输入“int()”,然后单击OK
。你已经完成了。
See, that wasn't so bad. Heck if I can do it, you definitely should be able to do it. I hope this was understandable and helpful. If not, well I guess I have failed you and I should now fall on my sword to save my honor.
看,这并没有那么糟糕。哎呀,如果我能做到,你一定能做到。我希望这是可以理解和有帮助的。如果没有,那么我想我辜负了你,我现在应该倒在我的剑上来拯救我的荣誉。