eclipse生成uml图的插件Green uml的安装和使用

由于学习java做课程作业需要花类的uml图,上网搜了很多方法。这是安装Green这个插件的方法。



有时候希望把我们写好的类生成一个UML图,是代码看上去更清晰,于是就找了下在eclipse下自动生成java类的UML图的插件,找了很多,发现了Green UML这么一个插件,很好用,下面是插件安装方法:


1.到http://green.sourceforge.net/builds.html页面查找对应自己Eclipse版本的GEF版本和Green UML版本

首先看最后列eclipse版本找到相应version列Green UML版本,点击Version列里面版本后进入到Green UML相应版本下载页面。下载下来后解压,把plugins目录下的所有东西拷贝到Eclipse安装目录下的plugins目录下,当然如果你不想和eclipse下的plugins混在一块,你可以单独出来用links目录配置eclipse插件,具体方法网上一大堆,很easy。

2.到http://www.eclipse.org/gef/downloads.php下载表格中GET version列对应的GEF版本,下载后我直接解压了,然后把其中的plugins目录的所有东西拷贝到Eclipse安装目录下的plugins目录下,如上所说,也可以单独配置。

安装好后,重启eclipse,可以发现右键点击某个java类后,在出现的菜单中有一项Green UML,点击下面的子菜单就可以帮我们生成这个类的UML图

当然,我们也可以右键点击包生成整个包下类的UML,其中各个类的关联都可以帮我们展现出来,很好很方便


补充:现在Green软件不支持下载更下版本了,只支持在eclipse中用输入站点的方式安装,官网上市这么说的:

green will now be distributed via update site instead of direct download. The latest build of green can be found at the following update site:

http://www.cse.buffalo.edu/faculty/alphonce/green

To install or update green, go to Help->Install New Software... Type in (or copy/paste) the above site URL and click Add. After the update site has been added, you can install from that same dialog.


Green的使用方法http://wenku.baidu.com/view/7ec0b519ff00bed5b9f31d1b.html


摘要:

Create a New Diagram
Important Note: Green UML will not work with classes in the default package!  In practice, this is not really a restriction because you should always put all of your classes in packages and never have code in the default package.

Create a New Blank Diagram
 In the Package Explorer, right-click anywhere in the desired project and select
"New/Other/Green UML Class Diagram" 


Create a New Diagram from an Existing Class or Interface -- creates a new class diagram with
 New class diagram with only one class/interface in it: 
Right-click the class or interface in the Package Explorer and select "Green UML/Add to New Class Diagram"
 New class diagram with the specified class/interface and its immediate
superclass:  Right-click the class or interface in the Package Explorer and select "Green UML/Incrementally Explore in New Class Diagram" Green UML will create an XXX.grn file in the root of the src folder (the default package location).   To rename a class diagram, highlight it's *.grnfile and go to the Eclipse main menu and select File/Rename or hit the F2


安装完成后如下:


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值