简体   繁体   English

Eclipse的UML插件 - 类图和Java代码生成 - Indigo / Juno

[英]UML Plugin for Eclipse - Class Diagrams & Java Code Generation - Indigo/Juno

I am looking for a UML plugin for Eclipse. 我正在为Eclipse寻找一个UML插件。 I know this questions has been asked several times, but most of them are a few years old. 我知道这几个问题已被问过几次,但大多数都是几年前的问题。 From what I read I would say that most people prefer eUML2, but this officially supports only Helios. 根据我的阅读,我会说大多数人更喜欢eUML2,但这只官方支持Helios。

So far I am using argoUML, but the absence of an undo-button is really an usability nightmare, to say the least. 到目前为止,我使用的是argoUML,但缺少一个撤销按钮实际上是一个可用性的噩梦,至少可以说。 Additionally I would prefer integration into Eclipse. 另外,我更喜欢集成到Eclipse中。

What I want is: 我想要的是:

  • Free/Open-source 自由/开源
  • Actively developed tool (support for Indigo, planned support for Juno) 积极开发的工具(支持Indigo,计划支持Juno)
  • Hassle-free installation in Eclipse 在Eclipse中轻松安装
  • Class diagrams 类图
  • Generate Java code from diagrams 从图中生成Java代码
  • Update the class diagrams after implementation is done (round-trip) 实施完成后更新类图(往返)

What would be nice: 什么会很好:

  • Other diagrams, where for me the most important are sequence and use case diagrams 其他图表,对我来说最重要的是序列和用例图

If there are in fact no suitable Eclipse plugins, than I would be happy if you could point out other tools that are free/open source and linux-based and which workflow you are using to accomplish the aforementioned requirements. 如果实际上没有合适的Eclipse插件,那么如果你能指出其他免费/开源和基于linux的工具以及你用来完成上述要求的工作流程,我会很高兴。

I'll definitely go with ObjectAid . 我绝对会选择ObjectAid

It supports drag and drop of classes and packages directly from your code in eclipse. 它支持在eclipse中直接从代码中拖放类和包。 No need to open another application for your modeling. 无需为您的建模打开另一个应用程序。

Model files (*.ucls) can be kept in a separate project in eclipse while you code/develop your Java codes in another project. 当您在另一个项目中编写/开发Java代码时,模型文件(* .ucls)可以保存在eclipse中的单独项目中。 All these can be done on a single eclipse session. 所有这些都可以在一次日食会话中完成。

Just want to emphasize on the drag-n-drop. 只是想强调拖拽。 I simply love it! 我只是喜欢它!

I'm using Eclipse Juno. 我正在使用Eclipse Juno。

I tried other modeling tools but didn't get what I wanted. 我尝试了其他建模工具但没有得到我想要的东西。

PS Creation of class diagrams is free, but needs an evaluation license for creating Sequence diagrams. PS类图的创建是免费的,但需要评估许可才能创建序列图。

For now I will go with either Green UML or UML Lab. 现在我将使用Green UML或UML Lab。 Green UML fulfills all the points I asked for, except that I'm not a hundred percent sure it is very actively developed. 绿色UML符合我要求的所有要点,除了我不百分之百确定它是非常积极的开发。 But the last update is from November 2011. It only supports class diagrams, but that is ok for me. 但最后一次更新是从2011年11月开始的。它只支持类图,但对我来说没问题。 It can be found here . 它可以在这里找到。

Other than that I will try the academic version of UML Lab as it looks a bit more promising, though not being free is a draw back. 除此之外,我将尝试UML实验室的学术版,因为它看起来更有前途,虽然不是免费的是退缩。

Papyrus is probably the best choice. 纸莎草纸可能是最好的选择。 It is actively developed and is an industry backed project. 它是积极开发的,是一个行业支持的项目。 It does not have code-generation capabilities by since the uml model is stored as an emf model you can use acceleo for code generation. 它没有代码生成功能,因为uml模型存储为emf模型,您可以使用acceleo进行代码生成。 Round trip (update of diagram after code update) is also not supported. 还不支持往返(代码更新后的图表更新)。 But it does support many other UML diagrams. 但它确实支持许多其他UML图。

I tried a number of open source tools, and actually found none that are good to use inside eclipse, so I am using Visual Paradigm for UML, community edition. 我尝试了一些开源工具,实际上没有找到任何在eclipse中使用的好工具,所以我使用Visual Paradigm for UML,社区版。 Not free, does not do what you want, but for modeling purposes it is way above any eclipse plug-in. 不是免费的,不能做你想要的,但是出于建模的目的,它远远超过任何eclipse插件。

The best is Omondo EclipseUML for Java code generation because I can model but also hand code. 最好的是用于Java代码生成的Omondo EclipseUML,因为我可以建模而且还可以手动编写代码。 I never loose my model because multiple iterations are possible opposite to other tools just working from model to code. 我从不放弃我的模型,因为多次迭代可能与从模型到代码的其他工具相反。

Accelero code generation is too complex and the code is not really good. Accelero代码生成过于复杂,代码也不是很好。 It requires to fix it manually once generated. 它需要在生成后手动修复它。 If more than one package then relations between packages are not generated. 如果有多个包,则不会生成包之间的关系。 I would say that accelero is good for a single class diagram code generation but as soon as you have more than one diagram in a package or multiple package then it is better not to use this plugin. 我想说加速器对于单个类图代码生成是有益的,但是只要在包或多个包中有多个图,那么最好不要使用这个插件。

I was looking for UML Round Trip Engineering tool that supports reversing and drawing sequence Diagrams. 我正在寻找支持反转和绘制序列图的UML Round Trip Engineering工具。 Focus is on sequence diagrams as majority of tools can help with class diagrams, but not sequence diags. 重点是序列图,因为大多数工具可以帮助类图,而不是序列图。

Among the Free or cheap tools: I tried Papyrus, Modisco, Modelio, ObjectAid - first 3 are bit over complicated for some basic reversing, tend to ask too many question to locate source and libraries and all is bit clumsy, and they don't help much with sequence diagrams. 在免费或廉价的工具中:我试过Papyrus,Modisco,Modelio,ObjectAid - 前三个对于一些基本的反转来说有点复杂,往往会问太多问题来找到源和库而且都有点笨拙,而且他们没有对序列图有很大帮助。 ObjectAid works well even with the most recent eclipse (Luna). 即使最近的日食(Luna),ObjectAid也能很好地工作。 Sequence diagrams have cheap license. 序列图具有廉价许可证。 Sadly - none of them understands Spring annotations (eg @autowire). 可悲的是 - 他们都没有理解Spring注释(例如@autowire)。

Among big and expensive tools like EA, Sparx, Magic Draw, UML Lab (Yatta) - I like none, I find them too expensive for what they offer. 在EA,Sparx,Magic Draw,UML Lab(Yatta)等大而昂贵的工具中 - 我不喜欢它,我觉得它们太贵了。 Also, Complicated to reverse code (endless search source path problems). 此外,复杂的反向代码(无尽的搜索源路径问题)。 Magic and Modelio can't reverse and auto-generate sequence diagrams. Magic和Modelio无法反转和自动生成序列图。

Alternative to these expensive tools is Altova UModel, it works as independent tool or eclipse plugin (I used it independently of eclipse, faster install, offers sync diagram with code function). Altova UModel是这些昂贵工具的替代品,它可以作为独立的工具或eclipse插件(我独立于eclipse使用它,更快的安装,提供带代码功能的同步图)。 It's the only tool that can open eclipse project extensions (doesn't ask about classpaths, however can't find maven libraries) and no support for Spring annotations. 它是唯一可以打开eclipse项目扩展的工具(不询问类路径,但无法找到maven库),也不支持Spring注释。 Java 7 is not officially supported but it works (minor exceptions with some rare generics). Java 7不受官方支持,但它可以工作(少数例外与一些罕见的泛型)。 If they add: full java 7 support, spring support, open whole eclipse workspace and support pom/maven libraries, that would be the best round trip engineering tool around. 如果他们添加:完整的Java 7支持,弹簧支持,打开整个eclipse工作区和支持pom / maven库,这将是最好的往返工程工具。

I ended up using ObjectAid, which is free/cheap and does things well (except spring autowire), lacks communication diagram which was great thing in Altova. 我最终使用了ObjectAid,它是免费的/便宜的并且做得很好(除了春天的自动装配),缺乏沟通图,这在Altova中很棒。

HTH someone... HTH有人......

PS: I use MyEclipse Pro sometimes, decent yearly price, it can do some things from above, you need to see trial version and if UML are suitable for business documentation (too many boxes/packages make diagrams confusing). PS:我有时会使用MyEclipse Pro,价格合理,可以从上面做一些事情,你需要看试用版本,如果UML适合商业文档(太多的盒子/包使图表混乱)。

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

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