`

EUML2 PLUGIN使用

阅读更多
eUML2是一款基于Eclipse应用程序的UML建模工具。开发者可以在UML开发过程中将模型转化为Java代码:确保软件质量和减少开发时间。

eUML2分为两种版本: eUML2免费版集合了Java开发者所需要的所有基本特性:

类/包图编辑器
序列图编辑器
Ecore图编辑器
实时代码/模型同步
模型导入/导出 包括OMG XMI格式
支持PNG, JPG, 和SVG格式导出图表
视图
颜色参数
模型助手
可以免费使用(甚至可以用于商业目的)。

eUML2商业版是免费版的扩展,增加一些新的和改进的特性。

eUML2可以通过下载安装或通过下面的url直接在Eclipse里更新安装:
http://www.soyatec.com/update
目前只是支持UML Class Diagram 和 UML Sequence Diagram.
以下是我做的一个Sample Of UML Class Diagram:
1.Policy_UML.ucd(UML文件)
<?xml version="1.0" encoding="UTF-8"?>
<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="Policy_Uml" size="977,916" id="com.euml2.uml" metadata="uml2-1.0" initialized="true" tag="1000" key="32303037303533312D3130303020546573745F50726F6A6563742F4A616D736F6E204875616E67">
  <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.1/@sourceConnections.0" name="ContractMstBean" location="120,180" size="150,189" id="com.euml2.Bean/ContractMstBean" runTimeClassModel="getPolicyStatus(),setInsertTime(Ljava.util.Date;),UserId,setUserId(Ljava.lang.String;),PolicyStatus,getInsertTime(),getPolicyCode(),InsertTime,PolicyId,getContractPrdBean(),ContractMstBean(),setPolicyCode(Ljava.lang.String;),getPolicyId(),getPolicyInfo(Ljava.lang.String;Ljava.lang.String;),setPolicyStatus(I),setContractPrdBean(Ljava.util.List;),getUserId(),PolicyCode,setPolicyId(J)">
    <children xsi:type="editmodel:CompartmentEditModel" size="106,90">
      <children xsi:type="editmodel:AttributeEditModel" name="InsertTime" id="com.euml2.Bean/ContractMstBean#InsertTime"/>
      <children xsi:type="editmodel:AttributeEditModel" name="PolicyCode" id="com.euml2.Bean/ContractMstBean#PolicyCode"/>
      <children xsi:type="editmodel:AttributeEditModel" name="PolicyId" id="com.euml2.Bean/ContractMstBean#PolicyId"/>
      <children xsi:type="editmodel:AttributeEditModel" name="PolicyStatus" id="com.euml2.Bean/ContractMstBean#PolicyStatus"/>
      <children xsi:type="editmodel:AttributeEditModel" name="UserId" location="10,82" id="com.euml2.Bean/ContractMstBean#UserId"/>
    </children>
    <children xsi:type="editmodel:CompartmentEditModel" size="127,36">
      <children xsi:type="editmodel:MethodEditModel" name="ContractMstBean" id="com.euml2.Bean/ContractMstBean#ContractMstBean()"/>
      <children xsi:type="editmodel:MethodEditModel" name="getContractPrdBean" id="com.euml2.Bean/ContractMstBean#getContractPrdBean()"/>
    </children>
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="com.euml2.Impl/ContractMstImpl&lt;-com.euml2.Bean/ContractMstBean" source="//@children.0" target="//@children.2" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
      <children xsi:type="editmodel:AssociationEndEditModel" location="77,0" attachSource="true"/>
      <children xsi:type="editmodel:AssociationEndEditModel" location="71,57"/>
    </sourceConnections>
    <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" packageIndication="3"/>
  </children>
  <children xsi:type="editmodel:ClassEditModel" name="ContractPrdBean" location="620,165" size="150,171" id="com.euml2.Bean/ContractPrdBean" runTimeClassModel="PolicyId,InsertTime,ProductStatus,getProduct(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),ProductName,ContractPrdBean(),ProductId">
    <children xsi:type="editmodel:CompartmentEditModel" size="121,90">
      <children xsi:type="editmodel:AttributeEditModel" name="PolicyId" id="com.euml2.Bean/ContractPrdBean#PolicyId"/>
      <children xsi:type="editmodel:AttributeEditModel" name="ProductId" id="com.euml2.Bean/ContractPrdBean#ProductId"/>
      <children xsi:type="editmodel:AttributeEditModel" name="ProductName" id="com.euml2.Bean/ContractPrdBean#ProductName"/>
      <children xsi:type="editmodel:AttributeEditModel" name="ProductStatus" id="com.euml2.Bean/ContractPrdBean#ProductStatus"/>
    </children>
    <children xsi:type="editmodel:CompartmentEditModel" size="112,36">
      <children xsi:type="editmodel:MethodEditModel" name="ContractPrdBean" id="com.euml2.Bean/ContractPrdBean#ContractPrdBean()"/>
      <children xsi:type="editmodel:MethodEditModel" name="getProduct" id="com.euml2.Bean/ContractPrdBean#getProduct(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
    </children>
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <sourceConnections xsi:type="editmodel:AssociationEditModel" name="Policy-Product" autoLocated="true" id="com.euml2.Bean/ContractMstBean@contractMstBean+com.euml2.Bean/ContractPrdBean@contractPrdBean" source="//@children.1" target="//@children.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" label="//@children.1/@sourceConnections.0/@children.2" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="Manhattan">
      <children xsi:type="editmodel:AssociationEndEditModel" name="contractPrdBean" location="0,92" id="com.euml2.Bean/ContractMstBean@contractMstBean+com.euml2.Bean/ContractPrdBean@contractPrdBean|com.euml2.Bean/ContractPrdBean#contractPrdBean" attachSource="true" multiplicityLabel="//@children.1/@sourceConnections.0/@children.0/@children.1" roleLabel="//@children.1/@sourceConnections.0/@children.0/@children.0" navigable="true" orderingKind="1">
        <children xsi:type="editmodel:LabelEditModel" name=" + contractPrdBean" location="528,236" size="93,14" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
        <children xsi:type="editmodel:LabelEditModel" name="1..*" location="605,264" size="16,14" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
      </children>
      <children xsi:type="editmodel:AssociationEndEditModel" name="contractMstBean" location="150,77" id="com.euml2.Bean/ContractMstBean@contractMstBean+com.euml2.Bean/ContractPrdBean@contractPrdBean|com.euml2.Bean/ContractMstBean#contractMstBean" multiplicityLabel="//@children.1/@sourceConnections.0/@children.1/@children.1" roleLabel="//@children.1/@sourceConnections.0/@children.1/@children.0" navigable="true">
        <children xsi:type="editmodel:LabelEditModel" name=" - contractMstBean" location="277,236" size="92,14" fontInfo="Arial-8-0" anchorKind="LastPart"/>
        <children xsi:type="editmodel:LabelEditModel" name="1" location="277,264" size="6,14" fontInfo="Arial-8-0" anchorKind="LastPart"/>
      </children>
      <children xsi:type="editmodel:WireLabelEditModel" name="Policy-Product" size="69,14" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
    </sourceConnections>
    <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="com.euml2.Impl/ContractPrdImpl&lt;-com.euml2.Bean/ContractPrdBean" source="//@children.1" target="//@children.3" targetEnd="//@children.1/@sourceConnections.1/@children.1" sourceEnd="//@children.1/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
      <children xsi:type="editmodel:AssociationEndEditModel" location="72,0" attachSource="true"/>
      <children xsi:type="editmodel:AssociationEndEditModel" location="72,57"/>
    </sourceConnections>
    <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showPackageMethods="true" showStaticMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showStaticInnerClasses="true" packageIndication="3" showAttributeProperty="true"/>
  </children>
  <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.0/@sourceConnections.0" name="ContractMstImpl" location="126,15" size="144,57" id="com.euml2.Impl/ContractMstImpl" runTimeClassModel="">
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showPackageMethods="true" showStaticMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showStaticInnerClasses="true" packageIndication="3" showAttributeProperty="true"/>
  </children>
  <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.1/@sourceConnections.1" name="ContractPrdImpl" location="620,30" size="145,57" id="com.euml2.Impl/ContractPrdImpl" runTimeClassModel="">
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
    <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showPackageMethods="true" showStaticMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showStaticInnerClasses="true" packageIndication="3" showAttributeProperty="true"/>
  </children>
  <children xsi:type="editmodel:NotepadEditModel" location="255,180" size="106,26" fontInfo="Arial-8-0" note="保单主类"/>
  <children xsi:type="editmodel:NotepadEditModel" location="525,165" size="96,26" fontInfo="Arial-8-0" note="险种主类"/>
  <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1;Product=eUML2" autoName="false"/>
  <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
    <leftRuler/>
    <topRuler/>
  </boardSetting>
  <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" showDependencyStereotype="true" showInterfaceStereotype="true" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showPackageMethods="true" showStaticMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showStaticInnerClasses="true" packageIndication="3" showAttributeProperty="true"/>
</editmodel:ClassDiagramEditModel>

2.对应生成的Java文件:
package com.euml2.Bean;

import java.util.Date;
import java.util.List;
import com.euml2.Impl.ContractMstImpl;

/** 
 * @author Huiwen.Huang
 */
public class ContractMstBean implements ContractMstImpl {

	/**
	 * get policy info
	 */
	public String getPolicyInfo(String policyId, String policyCode){
		return policyId+" "+policyCode;	
	}

	/**
	 * @uml.property  name="PolicyId"
	 */
	private long policyId;

	/** 
	 * Getter of the property <tt>POLICY_ID</tt>
	 * @return  Returns the policy_ids.
	 * @uml.property  name="PolicyId"
	 */
	public long getPolicyId() {
		return policyId;
	}

	/** 
	 * Setter of the property <tt>POLICY_ID</tt>
	 * @param POLICY_ID  The policy_ids to set.
	 * @uml.property  name="PolicyId"
	 */
	public void setPolicyId(long policyId) {
		this.policyId = policyId;
	}

	/**
	 * @uml.property  name="PolicyCode"
	 */
	private String policyCode = "";

	/** 
	 * Getter of the property <tt>POLICY_CODE</tt>
	 * @return  Returns the policy_codes.
	 * @uml.property  name="PolicyCode"
	 */
	public String getPolicyCode() {
		return policyCode;
	}

	/** 
	 * Setter of the property <tt>POLICY_CODE</tt>
	 * @param POLICY_CODE  The policy_codes to set.
	 * @uml.property  name="PolicyCode"
	 */
	public void setPolicyCode(String policyCode) {
		this.policyCode = policyCode;
	}

	/**
	 * @uml.property  name="InsertTime"
	 */
	private Date insertTime;

	/** 
	 * Getter of the property <tt>INSERT_TIME</tt>
	 * @return  Returns the insert_time.
	 * @uml.property  name="InsertTime"
	 */
	public Date getInsertTime() {
		return insertTime;
	}

	/** 
	 * Setter of the property <tt>INSERT_TIME</tt>
	 * @param INSERT_TIME  The insert_time to set.
	 * @uml.property  name="InsertTime"
	 */
	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	/**
	 * @uml.property  name="UserId"
	 */
	private String userId = "";

	/** 
	 * Getter of the property <tt>User_Id</tt>
	 * @return  Returns the user_Id.
	 * @uml.property  name="UserId"
	 */
	public String getUserId() {
		return userId;
	}

	/** 
	 * Setter of the property <tt>User_Id</tt>
	 * @param User_Id  The user_Id to set.
	 * @uml.property  name="UserId"
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 */
	public ContractMstBean(){
	}

	/**
	 * @uml.property  name="PolicyStatus"
	 */
	private int policyStatus;

	/**
	 * Getter of the property <tt>PolicyStatus</tt>
	 * @return  Returns the policyStatus.
	 * @uml.property  name="PolicyStatus"
	 */
	public int getPolicyStatus() {
		return policyStatus;
	}

	/**
	 * Setter of the property <tt>PolicyStatus</tt>
	 * @param PolicyStatus  The policyStatus to set.
	 * @uml.property  name="PolicyStatus"
	 */
	public void setPolicyStatus(int policyStatus) {
		this.policyStatus = policyStatus;
	}

	/** 
	 * @uml.property name="contractPrdBean"
	 * @uml.associationEnd multiplicity="(1 -1)" ordering="true" inverse="contractMstBean:com.euml2.Bean.ContractPrdBean"
	 * @uml.association name="Policy-Product"
	 */
	private List contractPrdBean;

	/** 
	 * Getter of the property <tt>contractPrdBean</tt>
	 * @return  Returns the contractPrdBean.
	 * @uml.property  name="contractPrdBean"
	 */
	public List getContractPrdBean() {
		return contractPrdBean;
	}

	/** 
	 * Setter of the property <tt>contractPrdBean</tt>
	 * @param contractPrdBean  The contractPrdBean to set.
	 * @uml.property  name="contractPrdBean"
	 */
	public void setContractPrdBean(List contractPrdBean) {
		this.contractPrdBean = contractPrdBean;
	}

}

附件为Policy_UML.ucd文件。
更多可以查看:http://www.soyatec.cn/euml2/features/eUML2%20Modeler/classdiagrameditor/
0
0
分享到:
评论

相关推荐

    eUML2-Free-Edition-3.4.0.20091120+dependencies_for_eclipse3.5.zip

    本文将深入探讨eUML2 Free Edition 3.4.0版本,以及其在Eclipse 3.5中的安装与使用,同时分析其中的"dependencies_for_eclipse3.5"部分。 eUML2 Free Edition 3.4.0.20091120是一个免费的UML插件,专为Eclipse 3.5...

    eUML2-free-Edition-3.6.0.20110120+dependencies_for_eclipse3.6.zip

    《eUML2免费版3.6.0与Eclipse3.6依赖关系详解》 ...开发者可以通过解析site.xml、features和plugins中的信息,轻松地在Eclipse环境中集成并使用eUML2,进行高效、直观的UML建模,从而提升软件开发的效率和质量。

    eUML free edition

    eUML2-Free-Edition-3.0.0.20070630+dependencies_for_eclipse3.3_1.zip 和 eUML2-Free-Edition-3.0.0.20070630+dependencies_for_eclipse3.3_2.zip 两个放到一起有plugins_1和plugins_2,合并为plugin一个文件夹即可...

    argouml-euml.jar.zip

    argouml-euml.jar实际上是一个包含了ArgoUML和E-UML相关类和资源的Java Archive,便于开发者在自己的项目中引入和使用。使用jar文件的好处在于它可以简化项目的依赖管理,将多个类文件打包在一起,减少类加载时间,...

    MyEcplse的UML工具插件

    在使用MyEclipse的UML工具插件eUML2时,开发者可以进行以下操作: 1. **创建模型**:通过eUML2,用户可以创建新的UML模型,定义类、接口、继承关系、关联等元素。 2. **绘制图表**:绘制各种类型的UML图表,如类图...

    eMUL free edition

    eUML2-Free-Edition-3.0.0.20070630+dependencies_for_eclipse3.3_1.zip 和 eUML2-Free-Edition-3.0.0.20070630+dependencies_for_eclipse3.3_2.zip 两个放到一起有plugins_1和plugins_2,合并为plugin一个文件夹即可...

    Francafa-开源

    在Francafa中,eUML2被用来创建和管理类图,然后通过项目提供的自动化转换机制,将这些类图转换为实际的Java源代码,从而减少手动编码的工作量,提高开发速度和代码质量。 在开源软件的范畴内,Francafa提供了一个...

    2022年HTML语言剖析(十四)特殊字符CSSHTML教程.docx

    2. `gt;` 表示大于号 `&gt;` 3. `amp;` 用于插入与号(&),因为在HTML中,&是保留字符,用来标识实体的开始,所以需要写成`&amp;`来显示实际的&符号 4. `"` 表示双引号,例如在属性值中使用时,需要转义为`"&quot;"`以...

    touch-2.2.0 重量级富框架 Sencha Touch

    前不久基于JavaScript编写的Ajax框架ExtJS,将现有的ExtJS整合JQTouch、Rapha&euml;l库,推出适用于最前沿Touch Web的Sencha Touch框架,该框架是世界上第一个基于HTML5的Mobile App框架。同时,ExtJS更名为Sencha,...

    Eclipse的UML图插件ModelGoon

    其他Eclipse UML插件,如eUML2、Papyrus等,也有各自的优点和特色。选择哪个插件通常取决于个人偏好和项目需求。例如,Papyrus是Eclipse基金会官方支持的UML工具,提供更全面的UML支持,而ModelGoon则以其简洁和高效...

    hsm:基于boost hana元编程库的有限状态机库。 它遵循boost msm和boost sml库的原理,但尝试将自己的复杂元编程代码减少到最低限度

    哈纳状态机(HSM) hana状态机(hsm)是基于元编程库的库。 它遵循和库的原理,但是尝试将自己的复杂元编程代码减少到最低限度... eUml后缀前端 ✓ ✓ ✓ ✗ eUml前缀前端 ✓ ✓ ✓ ✗ 进入/退出伪状态 ✓ ✗

    ASCII码_含扩展(256个字符)_含解释

    - **&euml;** (137): 德语中的小写字母e带双点。 - **è** (138): 法语中的小写字母e带重音符。 - **&iuml;** (139): 德语中的小写字母i带双点。 - **&icirc;** (140): 法语中的小写字母i带环音符。 - **ì** ...

    HTML中特殊字符

    - **&Euml;**:显示为 Ë ,带有双点的大写“E”。 - **&Iacute;**:显示为 Í ,带急促重音的大写“I”。 - **&Icirc;**:显示为 Î ,带有圆顶重音的大写“I”。 - **&Igrave;**:显示为 Ì ,带低重音的大写“I”...

    model-harmonics:用于处理来自大气,海洋和陆地表面模型的球谐系数的Python工具

    模型谐波 用于获取和使用模型合成球谐系数的Python工具,用于与NASA / DLR重力恢复和气候实验(GRACE)和NASA / GFZ重力恢复和气候实验后续任务(GRACE-FO)的数据进行比较这些是工具集的扩展例程资源 依存关系参考I...

    html字符实体表_是搞定实体的好帮手

    - **拉丁二连元音大写E(&Euml; / &#203;)**:E的二连元音形式。 - **拉丁抑音大写I(&Igrave; / &#204;)**:I的抑音形式。 - **拉丁重音大写I(&Iacute; / &#205;)**:I的重音形式。 - **拉丁长音大写I(&Icirc;...

Global site tag (gtag.js) - Google Analytics