eclipse画UML类图 (1)

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

MDT/UML2/Getting Started with UML2 < MDT‎| UML2

Copyright © 2004, 2014 International Business Machines Corp., CEA, and others.

Contents

[hide]

1 Summary

2 Prerequisites

3 Introduction

4 Getting Started

5 Creating Models

6 Creating Packages

7 Creating Primitive Types

8 Creating Enumerations

9 Creating Enumeration

Literals

10 Creating Classes

11 Creating Generalizations

12 Creating Attributes

13 Creating Associations

14 Saving Models

15 Conclusion

16 References

Summary

This article describes how to get started with the UML2 plug-ins for Eclipse. In particular, it gives an overview of how to create models (and their contents) both programmatically and by using the sample UML editor.

Kenn Hussey and James Bruck

Last Updated: January 21, 2014

Prerequisites

To start using UML2 (and to follow along with the example in this article), you must have Eclipse, EMF, and UML2 installed. You can

either download the Modeling Tools Package or follow these steps: 1Download and run Eclipse.

2Select the Help > Install New Software… menu item.

3Select a software site to work with, e.g., Luna -

/releases/luna.

4Expand the Modeling tree item.

5Select UML2 Extender SDK and press the Next > button.

6Review the install details and press the Next > button.

7Accept the terms of the license agreement and press the Finish button.

8Restart Eclipse when prompted to do so.

At this stage, UML2 and all dependencies should be installed. Introduction

This article will walk you through the basics of creating models using UML2. Using a simple model (the ExtendedPO2 model, shamelessly “borrowed” from the EMF “bible” [1]) as an example, we’ll look

at what’s involved in creating some of the more common elements that make up a model. For each type of element, we’ll first explain the creation process using the sample UML editor and then explore how to accomplish the same thing using Java code. The ExtendedPO2 model is shown below.

Getting Started

Readers who don't want to follow every step of this tutorial

may install a working solution from the New → Example... wizard, selecting the UML2 Example Projects → Getting Started with UML2 sample. This will be available when Enhancement 382342 is resolved and released in a UML2 build. This includes the finished model, complete source code, and a launch configuration that runs the stand-alone Java application which creates the model in the root folder of the example project.

相关文档
最新文档