Eclipse UML插件介绍、安装及使用

合集下载

Eclipse安装插件

Eclipse安装插件

Eclipse安装插件有2种方法,第一种直接覆盖目录,第二种用link的方式。

我们推荐用第二种,可以实现动态的配置。

插件一般安装在features目录和plugins目录下,如果用覆盖安装,就直接覆盖这2个目录。

一、使用links方式安装eclipse插件。

●假设eclipse安装目录是D:\eclipse,待安装插件目录是D:\eclipse\eclipseplugins。

以MyEclipse和Hibernate-tools为例说明如何使用links方式安装eclipse插件。

●●在D:\eclipse\eclipseplugins中建立如下的目录结构:●●D:\eclipse\eclipseplugins\MyEclipse\eclipse●将MyEclipse安装文件解压到此目录中(有安装版和解压版2种),这个目录将包含一个plugins目录,即目录结构是这样的:●●D:\eclipse\eclipseplugins\MyEclipse\eclipse\plugins●在D:\eclipse\links目录下新建文件,命名为MyEclipse.link,编辑此文件,加入如下内容并保存●path = D:/eclipse/eclipseplugins/MyEclipse●eclipse 将会到指定的目录下去查找eclipse\features目录和eclipse\plugins目录,看是否有合法的功能部件和(或)插件。

也就是说,目标目录必须包含一个\eclipse 目录。

如果找到,附加的功能部件和插件在运行期配置是将是可用的,如果链接文件是在工作区创建之后添加的,附加的功能部件和插件会作为新的配置变更来处理。

●其它压缩文件解压后若已经包含eclipse\plugins目录,则不需要建立eclipse目录●●2、安装Hibernate-tools●●解压hibernate-tools-3.1.0.alpha5.zip到目录D:\eclipse\eclipseplugins\hibernate-tools\eclipse\plugins目录下。

eclipse的插件安装方法

eclipse的插件安装方法

eclips‎e的插件安装‎方法Eclips‎e的插件机制‎是轻型软件组‎件化架构。

在客户机平台‎上,Eclips‎e使用插件来‎提供所有的附‎加功能,例如支持Ja‎v a以外的其‎他语言。

已有的分离的‎插件已经能够‎支持C/C++(CDT)、Perl、Ruby,Python‎、telnet‎和数据库开发‎。

插件架构能够‎支持将任意的‎扩展加入到现有环境中,例如配置管理‎,而决不仅仅限‎于支持各种编‎程语言。

Eclips‎e的设计思想‎是:一切皆插件。

Eclips‎e核心很小,其它所有功能‎都以插件的形‎式附加于Ec‎l ipse核‎心之上。

Eclips‎e基本内核包‎括:图形API (SWT/Jface),Java开发‎环境插件(JDT ),插件开发环境‎(PDE)等。

Eclips‎e插件的安装‎方法大体有以‎下几种方式:第一种:直接复制法假设Ecli‎p se的安装‎目录在C:\eclips‎e,解压下载的e‎c lipse‎插件或者安装‎e clips‎e插件到指定目‎录AA(如:c:\AA)文件夹,打开AA 文件夹,在AA文件夹‎里分别包含两‎个文件夹fe‎a tures‎和plugi‎n s ,然后把两个文‎件夹里的文件‎分别复制到C‎:\eclips‎e下所对应的‎文件夹下的f‎e ature‎s和plugi‎n s 下,一般的把插件‎文件直接复制‎到eclip‎s e目录里是‎最直接也是最‎愚蠢的一种方‎法!因为日后想要‎删除这些插件‎会非常的困难‎,不推荐使用。

注意:直接将插件包‎解压到plu‎g ins文件‎夹下之后,重启ecli‎p se,可能不会加载‎新的插件。

解决方法是:1、打开命令行,到当前ecl‎i pse的目‎录下,输入ecli‎p se -clean,重新启动ec‎l ipse,这样ecli‎p se 就会加‎上新的插件了‎。

2、如果插件不能‎生效,则请将ecl‎i pse\config‎u ratio‎n\org.eclips‎e.update‎目录删除后再‎启动ecli‎p se;你可以在ec‎l ipse的‎菜单"Help"-->"About Eclips‎e SDK"-->"Featur‎e Detail‎s" 和"Plug-in Detail‎s"中看到新安装‎的插件。

Eclipse的下载安装以及常见插件的配置

Eclipse的下载安装以及常见插件的配置

1、下载Eclipse在Eclipse官网(/downloads/)下载你需要的Eclipse,我选择windows_32 bit的Java EE下载之后解压缩就可以使用了。

2、配置tomcat插件(1)下载tomcat官网地址:/,下载之后解压即可(2)安装Tomcat插件下载Tomcat对Eclipse的插件下载地址:/tomcatPlugin.html解压,把com.sysdeo.eclipse.tomcat_3.3.0(根据版本不同,名称不同)到Eclipse的plugins文件夹下,重新启动Tomcat之后,就可以看到Tomcat的小图标(3)配置TomcatWindow→Preferences→T omcat,选择你对于的T omcat的版本和Tomcat的解压目录,点击“Apply”即可回到Eclipse页面,点击tomcat启动图标,是不是有反映了呢然后访问http://localhost:8080,好了,T omcat启动了3、安装Android插件前提是你的电脑上已经存在Android的环境安装ADT:Help→Install New Software在Work with中输入插件地址https:///android/eclipse/,选择安装即可安装好了之后,重启Eclipse,配置Android的SDK地址即可Window→Preferences→Android,在SDK Location选择你的Android SDK 所在目录4、安装SVN插件在svn的官网上,有详细的介绍eclipse安装svn的方法官网地址:/servlets/ProjectProcess?pageID=p4wYuA 重启Eclipse5、安装Maven(1)解压apache-maven.zip到目录下比如d:\apache-maven(2)配置maven环境变量,变量名称:M2_HOME,变量值:d:\apache-maven(maven 解压目录);变量名称:MA VEN_OPTS,变量值:-Xms128m -Xmx1024m,PATH增加d:\apache-maven\bin,(3)Cmd运行mvn - v,出现如下窗口,正解:(4)安装Eclipse插件eclipse→help→install new software→add,地址:/sites/m2e,安装重启eclipse(5)设置eclipse上maven插件,选择User Settings设置安装的maven的settings.xml 地址(6)修改eclipse目录下的eclipse.ini在-vmargs参数前增加两行(请输入你自己jdk路径)-vmc:/java/jdk1.6.0_10/bin(7)导入Maven项目,选择import然后SCM URL选择svn,点击Browse如果是SCM中svn出现不了,那么elcipse缺少插件支持maven连接svn,那么则需要配置maven的额外支持插件,下载地址:/sites/m2e-extras/,通过Eclipse安装,选择我们需要的即可6、安装ExtJS的工具Spket(1)下载ExtJS,解压(2)下载Spket插件eclipse→help→install new software→add地址:/update/安装完成后,重启Exlipse就ok了(3)在Eclipse中配置Spket如果你下的ExtJS是2.x的版本,那么在source目录下会找到ext.jsb文件,如果版本是3.x及以上,那么就是ExtJS的解压目录下就可以找到ext.jsb2的文件。

Eclipse插件安装总结-huxin1的专栏-CSDN博客

Eclipse插件安装总结-huxin1的专栏-CSDN博客

Eclipse插件安装总结-huxin1的专栏-CSDN博客Eclipse插件安装总结收藏Eclipse插件安装总结通过个人的学习体会,将目前Eclipse插件安装的三种方式,总结如下:第一种方法很简单,在Eclipse的主目录(%ECLIPSE_HOME%)下有一个plugins目录和features目录。

将插件解压缩后,在解压缩后的文件夹里一般可以看到plugins文件夹,有的插件解压缩后还可以看到一个features文件夹。

一般将plugins文件夹下的内容直接拷贝到%ECLIPSE_HOME%\plugins目录下,如果解压缩后的插件目录下还有features文件夹,则把该文件夹下的内容也拷贝到%ECLIPSE_HOME%\features下。

重新启动Eclipse之后就可以使用刚刚安装的插件了。

如果不能使用插件,可能是因为插件还未启用。

可以到Help/Software Updates/Manage Configuration下将“Disable”的插件“Enable”即可。

这种插件安装方式简单、快捷,但是有缺陷,若插件太多,会使内容非常混乱,而且分不清哪个是系统自带的,哪个是以后安装的。

当安装了许多插件之后,Eclipse变的很大,不便于更新和管理众多插件。

每次重新安装Eclipse,就要花时间来安装那几个常用的插件。

第二种方法也很简单,它主要借助于Eclipse的向导来安装插件。

通过Help/Software Updates/Find and Install,在弹出的菜单中选择“Search for new features to install”,点“Next”,在下一菜单中选择“New Local Site”或“New Archived Site”,找到你下载的插件所在目录,选中安装即可。

这种方法安装插件比较安全,不易出错,缺点就是对于插件的要求也比较挑剔,所以能够支持这种方式安装的插件也比较少。

eclipse插件安装方法

eclipse插件安装方法

eclipse插件安装方法eclipse平台+插件的方式使eclipse很容易扩充,eclipse插件安装的方式有两种:1.一种是内置方式安装,即下载插件后解压缩,然后把解压后插件的plugins和features 目录里面的内容分别复制到eclipse安装目录的plugins和feature目录里面,这种方法安装比较简单,但是问题也比较多,因为所有的插件的文件都混合到了plugins和feature目录里面,eclipse会变得比较臃肿,而且如果你不想再使用某个插件,卸载会是一件非常麻烦的事情。

2.第二种方式就是使用外挂的方法,下面通过eclipse3.2汉化包的安装来说明一下:1)建立一个D:\eclipse3.2.2\myPlugins目录,这个目录是我们准备存放所有eclipse插件的地方3)然后建立一个D:\eclipse.2.2\myPlugins\NLPack1-eclipse-SDK-3.2目录,这个目录是我们存放汉化包的地方4)然后解压eclipse汉化包,NLPack1-eclipse-SDK-3.2.zip,在D:\eclipse3.2.2\myPlugins\NLPack1-eclipse-SDK-3.2目录里面解压缩,解压缩后的内容会在一个名为eclipse目录中5)建立一个D:\eclipse3.2.2\links目录,新建一个文件language.link(文件名可随意),文件的内容只有一行,如下:path=D:\\eclipse3.2.2\\myPlugins\\NLPack1-eclipse-SDK-3.26)启动eclipse,汉化成功tip:其他的插件也可以用这样的方式安装,目录和文件的名字建议保留插件的版本号,这样便于今后对插件进行升级和管理.4.配置SWT Designer6.2.0SWT Designer6.0 下载后是一个文件名为“Designer_v6.0.0_for_Eclipse3.2.zip”的压缩包。

Eclipse3.3 安装及插件配置

Eclipse3.3  安装及插件配置

四、优化优化的目的是为了让eclipse运行更稳定更流畅更快!首先:内存优化eclipse安装后,在安装目录有个eclipse.ini文件,内容如下:-vmargs-Xms40m-Xmx256m这个文件用来配置eclipse启动时候的内存分配方案,Xms是初始化内存大小,Xmx是最大可使用内存大小,这个默认的配置是eclipse资源消耗最小化的配置。

如果你的项目比较大,这个配置必须改,一般适当调整为128,384即可,若项目更大一些则调整的再大一些,根据实际情况决定。

这个参数配置的大小很关键,太小,eclipse垃圾回收会过于频繁导致很慢,或者内存堆栈溢出而崩溃。

太大,eclipse会吃掉大量内存,垃圾回收周期变长,但每次回收会很慢,影响使用。

所以你在配置的时候需要权衡,尝试!其次:插件优化当你安装了多个插件的时候,会消耗很大的内存资源,为此你只需要将不用的插件配置文件从links目录移除,注意了,不是删除,你可以在links目录里面新建一个_useless,将不用的配置文件移放到其中,用的时候再移放回来。

五、常见问题解决1、eclipse语言包或者其他插件没有安装上原因:是你可能运行过了英文版的eclipse之后才装语言包的。

解决办法:删掉configuration中除了config.ini以外的所有文件和文件夹,确保插件安装配置正确。

2、eclipse启动不了原因:没有正确安装jdk,或者没有配置jdk,一般情况下安装jdk后需要配置,但当你装过多次jdk 或者用以前系统中遗留下载的已经安装过的jdk的时候,需要配置jdk,同时还要注意eclipse对jdk的版本的要求。

解决办法:配置JDK。

也就是配置系统变量JAVA_HOME、CLASSPATH、PATH,必要时候还要重装jdk。

如果还不能解决,也许就是你的eclipse文件有损坏或丢失,或者你的硬盘有坏道了,怎么办就很清楚了,呵呵。

3、想要重新配置工作空间原因:你默认了工作空间,很郁闷,每次都是那个。

【Eclipse使用方法】Eclipse中安装插件的三种方式

【Eclipse使用方法】Eclipse中安装插件的三种方式

【Eclipse使用方法】Eclipse中安装插件的三种方式Eclipse也用了很久,但是都没有怎么去研究过怎么安装插件,今天正好在自己新买的本上试了一下。

现在将心得写下,以供参考。

目前安装Eclipse插件主要有以下三种方式:在线安装:以TestNG的安装为例来阐述其安装过程。

第一步:点击菜单栏中“Help”菜单,在下拉列中选择“Install New Software...”.此时会弹出“install”的安装框。

第二步:在弹出的“install”框,选择之前已经建立好的site,如果没有建立好,则可以点击“Add”按钮,弹出一个添加site的对话框,在该框中的Name属性后面给该site起一个别名,在location属性后面输入该插件所在的网络位置(该位置一般都会在插件的官方网站上给一个地址,直接copy过来就行。

)。

第三步:点击OK。

系统会自动地将testNG给load出来。

然后选中,点击“next”。

逐步完成即可。

离线侵入式安装:也就是将插件下载下来,解压缩后,会看见features和plugins 两个文件夹,将这两个文件夹中的所有内容相应地拷贝到eclipse的features和plugins文件夹下面,重启eclipse即可。

如果没有这个两个文件夹,那说明所给的插件本身属于plugin,所以只需要将该插件解压缩后放在plugins下面即可。

此处以WTP为例:解压缩后会有features和plugins两个文件夹。

那么直接将这两个文件夹中的内容分别copy到eclipse安装目录下面的features和plugins里面。

然后重启eclipse即可。

以TestNG为例,只需将下载下来的插件jar包Copy到plugins 下面即可。

注:这种方式不太好,因为当你要去卸载或者更新某个插件的时候,去features和plugins里面找某个插件会非常的麻烦。

离线链式安装:在eclipse的安装目录下面,建立一个links的文件夹,在该文件夹下面创建一个以插件名命名的link文件,在该文件中输入以下键值对:path=“插件所在的绝对路径或插件所在的相对路径”。

Eclipse及其插件配置安装

Eclipse及其插件配置安装

JDK+Eclipse + EclipseMe+WTK+Tomcat+混淆器下载与安装简介Eclipse本身只是一个框架和一组响应的服务,并不能够开发什么程序。

在Eclipse中几乎每样东西都是插件,实际上正是运行在eclipse平台上的种种插件提供我们开发程序的各种功能。

同时各个领域的开发人员通过开发插件,可以构建与Eclipse环境无缝集成的工具。

这里的主要插件有:JDK,Eclipseme,WTK,SDk.1 JDK安装搭建Eclipse的第一个步骤就是要安装JDKJDK(Java Development Kit)是Sun Microsystems针对Java开发员的产品。

自从Java推出以来,JDK 已经成为使用最广泛的Java SDK(Software development kit)。

JDK 是整个Java的核心,包括了Java运行环境(Java Runtime Environment),一堆Java工具和J ava基础的类库(rt.jar)。

不论什么Java应用服务器实质都是内置了某个版本的JDK。

因此掌握JDK是学好J ava的第一步。

最主流的JDK是Sun公司发布的JDK,除了Sun之外,还有很多公司和组织都开发了自己的JDK,例如IBM公司开发的JDK,BEA公司的Jrocket,还有GNU组织开发的JDK等等。

其中IBM的JDK 包含的JVM(Java Virtual Machine)运行效率要比Sun JDK包含的JVM高出许多。

而专门运行在x86平台的Jrocket在服务端运行效率也要比Sun JDK好很多。

但不管怎么说,我们还是需要先把Sun JDK掌握好。

从SUN的JDK5.0开始,提供了泛型等非常实用的功能,其版本信息也不再延续以前的1.2,1.3,1.4,而是变成了5.0,6.0了。

从6.0开始,其运行效率得到了非常大的提高,尤其是在桌面应用方面。

JDK本身使用了Java语言编写,在我们下载的安装包里,有一个src.zip,里面就是JDK的源代码。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Eclipse UML插件Green官网:/安装方法:解压后,把plugins文件夹拷贝到Eclipse的根目录了下,即把plugins文件夹里的文件拷贝到Eclipse的plugins目录下。

注意:最新版本只支持Eclipse 3.5 (Galileo)Green BuildsRelease Date Installation Release Notes Version GEF Version Eclipse Version October 22,2009 N/A Notes 3.5.0 3.4 3.5 (Galileo)October 30,2009 N/A Notes 3.4.0 3.4 3.4 (Ganymede) December 14, 2008 N/A N/A 3.1.0 3.4 3.4 (Ganymede)November 5, 2008 N/A N/A 3.1.0 RC2 3.4 3.4 (Ganymede)October 3, 2008 N/A N/A 3.1.0 RC1 3.4 3.4 (Ganymede) September 15, 2008 N/A N/A 3.0.1 3.4 3.4 (Ganymede) October 19, 2007 Procedures Notes 3.0.0 3.3 3.3 (Europa) July 17, 2007 Procedures Notes 2.5.1 3.2 3.3 (Europa)June 5, 2007 Procedures Notes 2.5.0 3.2 3.2 September 12, 2006 Procedures Notes 2.5.0 RC3 3.2 3.2March 1, 2006 Procedures N/A 2.5.0 RC2 3.1.1 3.2 December 13, 2005 N/A N/A 2.5.0 RC1 3.1.1 3.2October 12, 2005 N/A N/A 2.4.0 3.1.1 3.1操作说明:安装成功后,在Eclipse的Window -> Preferences,能看到Green的菜单项:如图右键点击某个类或接口,可以把该类或接口添加到一个类图中(不支持拖拽):点击右下角的案件[Toggle Explwration Icons],可以去掉[All ->…]可以通过点击右键,把类图导出为.gif, .jpg, .png等格式的图片Using the Green UML Plugin for EclipseThe open-source Green UML plug-in, from the Computer Science and Engineering Department at the University at Buffalo (State Univ. of New York), enables the developer to generate Java code by directly creating and manipulating a UML diagram. Likewise, a UML diagram can be created from existing code ("round-trip engineering"). Changes in the diagram are immediately reflected in the code and changes in the code are reflected in the diagram right away as well. This frees the developer to focus on the design and architecture of their system without worrying about the syntactical details of the programming language.Home page of Green UML.On-line DocumentationOff-line Documentation: In Eclipse, in the main top menu, go to Help/Help Contents and click on the Green Users Guide.To install the Green UML plug-in, please go to the Eclipse installation page.If you are new to UML class diagrams, it is highly recommended that you review the basics of UML first.Green UML Screen ShotQuick StartNote: Sometimes a change made directly in the Java code does not immediately show up in the diagram. It is recommended that after making changes directly to the code, whenswitching back to the diagram, right-click in any clear area of the diagram and select"Refresh Editor". This will insure that the diagram is properly synchronized with the code.Create a New DiagramImportant Note: Green UML will not work with classes in the default package! Inpractice, this is not really a restriction because you should always put all of your classesin packages and never have code in the default package.Create a New Blank DiagramIn 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 classdiagram withNew class diagram with only one class/interface in it:Right-click the class orinterface in the Package Explorer and select "Green UML/Add to New ClassDiagram"New class diagram with the specified class/interface and its immediatesuperclass: 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 defaultpackage location). To rename a class diagram, highlight it's *.grn file and go to the Eclipse main menu and select File/Rename or hit the F2 function key.Adding Classes and Interfaces to DiagramsCreate a New Class or Interface in the Diagram1.On the right side of the diagram, in the Palette, highlight either "Class" or"Interface".2.Move the mouse over to the desired location for the class on the diagram andleft-click to deposit a class or interface icon at that location.3.Fill out all the desired information in the pop-up dialog that appears.Green UML will automatically generate the appropriate Java file for your newclass or interface and will also auto-generate the code stubs for the class orinterface.Add an Existing Class or Interface to a DiagramTo add an existing class or interface to a diagram, be sure that the desired diagramis open and visible.Right-click the desired Java file in the Package Explorer and select Green UML/Add to Last Viewed Class DiagramModify a Class or Interface on a DiagramDouble-clicking on a class or interface will open its Java code file for editing.o Changing the visibility (public, private, protected, etc) of a class must be done via the code editor.Adding a method or field:1.Right-click the name of class or interface in the diagram to select the entireclass/interface2.Then select Add and then click Add Field or Add Method.3.Fill out the pop-dialog box with the appropriate specifications for the new field ormethod.Green UML will automatically generate a stub (signature but no code body) for anymethods and fields that are made.Editing an existing methodRight-click the method and select "Refactor/Change MethodSignature". This will bring up the dialog window to edit the signature of themethod.Adding Relationship Lines to a UML Class DiagramAdding Inheritance LinesGeneralization Lines (solid lines with closed arrowheads) indicate that asubclass extends superclass or an sub-interface extends asuper-interface. The arrow will point from the subclass (sub-interface) to thesuperclass (super-interface).1.In the Palette, highlight the "Generalization" option.2.Left-click on the desired subclass (sub-interface). A line will now beattached from that class/interface to the mouse pointer.3.Move the mouse to the desired superclass (super-interface) and left-click. Ageneralization line will be created and the associated Java code will beauto-generated. Green UML will not let you create a line that would resultin invalid Java code.Realization Lines (dotted lines with closed arrowheads) indicate that aclass implements an interface. The arrow will point from the class to theinterface.1.In the Palette, highlight the "Realization" option.2.Left-click on the desired class. A line will now be attached from thatclass/interface to the mouse pointer.3.Move the mouse to the desired interface and left-click. A realization linewill be created and the associated Java code will be auto-generated. GreenUML will not let you create a line that would result in invalid Java code.Adding Association and Composition LinesAssociation line s (tailless solid lines with open arrowheads) indicate that oneclass holds a static reference to another class or instance of an interface, i.e. it hasa field of the referenced type. The association line points from the class with thereference to the referenced class. Green UML has the erroneous notionunfortunately, that all such fields are initialized via constructor input parameters,so it auto-generates both the field and adds constructor code to initialize it via aconstructor input parameter. Unfortunately, this constructor code will need to bedeleted if one initializes the field in a different manner, such as by using a factoryobject.1.In the Palette, highlight the "Association" option.2.Left-click on the class you want to have the reference to the other class. Aline will now be attached from that class to the mouse pointer.3.Move the mouse to the desired interface and left-click. An association linewill be created and the associated Java code (field & constructor) will beauto-generated. Green UML will not let you create a line that would resultin invalid Java code.Composition lines (solid lines with no arrowheads and a diamond-shaped tail)indicate that one class holds a static reference to another class or instance of aninterface, i.e. it has a field of the referenced type, but also explicitly constructs theobjects being referenced. Colloquially, we say that one object "owns"another. The composition line points from the "owner" to the referencedclass. Green UML has the erroneous notion unfortunately, that all such fieldsare initialized via constructor input parameters, so it auto-generates both the fieldand adds constructor code to initialize it with the referenced class'sconstructor.. Unfortunately, this constructor code will need to be deleted if oneinitializes the field in a different manner, such as by using a factoryobject. Green UML is currently unable to handle an composition with an abstractclass or interface, which is rather common.1.In the Palette, highlight the "Composition" option.2.Left-click on the class you want to have the reference to the other class. Aline will now be attached from that class to the mouse pointer.3.Move the mouse to the desired interface and left-click. An association linewill be created and the associated Java code (field & constructor) will beauto-generated. Green UML will not let you create a line that would resultin invalid Java code.Adding Dependency Lines (not shown on screen shot above)Dependency lines (tailless dotted lines with open arrowheads) are used to indicate avariety of usually dynamic relationships between classes and interfaces, such as takinganother class as an input or returning it from a method, or instantiating it for use as alocal variable or value. If class "A" uses class "B", the dependency arrow will pointfrom class "A" to class "B".Green UML supports the two dependency scenarios. In the Palette, you may seeeither the "Instantiaton Dependency" or "Local AssignmentDependency" option. Clicking the small triangle next to the visible choice willshow you the other choice. A "push-pin" icon lets you show both options at once.Instantiation Dependency is when a method in one class instantiates another class foruse as a value in a method.1.Highlight the "Instantiaton Dependency" option and drawing a line fromthe class doing the instantiation to the one being instantiated. Green UML willwant you to only use concrete, classes that can be instantiated.2.A dialog box will appear asking you what method to put the code stub. The"cardinality" is simply how many instances you wish created.3.Green UML will generate the constructor call in the desired method.Local Assignment Dependency is when a method in one class creates a local variable of the type of the target class of the dependency.1.Highlight the "Local Assignment Dependency" option and drawing a linefrom the class doing the instantiation to the one being instantiated. The targetmay be an abstract class or an interface, but if it is, Green UML will ask youwhich concrete sub-class/implementation to actually instantiate.2.A dialog box will appear asking you what method to put the code stub. The"cardinality" is simply how many instances you wish created.3.Green UML will generate the constructor call and local variable assignment in thedesired method. The variable type will be the target of the dependency but theconstructor call will be to the selected concrete sub-type if the target isabstract. Green UML is not capable of auto-generating code for instantiating aconcrete subclass of a concrete superclass local variable.Adding Notes (not shown on screen shot above)Notes are just boxes of text placed on the diagram to help the reader understand itbetter.1.Highlight the "Note" option in the Palette.2.Left-click wherever you want the note to appear in the diagram.3.Fill out the text of the note box.Tips and TrapsExporation IconsGreen UML has a feature where it can automatically add the superclass or implementedinterface of a selected class onto the diagram. This is referred to as "incrementalexploring". If your diagram looks like the following, where an "ALL......" isdisplayed under the class name, the exploration feature is activated.Clicking on the "ALL" will display the superclass or interface. You can choose whatto show by right-clicking the class and selecting "Incrementally Explore".Clicking the "Toggle Exploration Icons" option in the Paletter will turn theincremental exploration feature on and off.Technical ErrorsGreen UML incorrectly uses an empty diamond symbol to denote a composition--theUML standard is to use a filled diamond. Empty diamonds are generally used for"aggregations" which closely resembles Green UML's "associations", which is really thegeneric term encompassing both aggregations and compositions. See, forinstance, /content/m11658/latest/ and /wiki/Class_diagram.BUG in Green 3.5.0 when branching in SVN: In this version (and presumably,earlier versions as well) of Green UML, the .GRN diagram file holds hard-codedreferences to the Eclipse project folder. These references are NOT updated when thesource code is branched and subsequently copied to another project folder. Thus, inthe branched code, the diagrams will appear blank because Green UML cannot find thesource files because it is looking in the wrong place. Work around:The .GRNdiagram files are just ASCII text files in an XML-like format. Use any text editor, e.g.Notepad, to open the file and globally search and replace all occurances of the oldproject folder name with the new project folder name.AmaterasUML官网:http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=AmaterasUML安装方法:解压后,把.jar文件(3个)拷贝到Eclipse的plugins目录下。

相关文档
最新文档