UML DESIGNER 教程 好不容易才找到!!!

PUBLIC

https://github.com/ObeoNetwork/UML-Modeling/blob/master/plugins/org.obeonetwork.dsl.uml2.design.doc/doc/UML%20Designer%20User%20Guide.textile

ObeoNetwork  /  UML-Modeling
 branch: master
  file    421 lines (243 sloc)    15.821 kb

© Obeo 2011 – All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0

Authors Gonzague Reydet / Cédric Brun / Yvan Lussaud
Contact cedric.brun@obeo.fr / yvan.lussaud@obeo.fr

Providing Feedback

This UML modeling environment is based on the Obeo Designer product. It is under an
Open Source license (EPL) and the source code is hosted on github.

It is intended to cover most use cases behind the usage of UML, and more importantly to be reused when you apply a 
model driven approach wich uses both UML and some DSL. Everything should integrate seamlessly in the same environment.

We’re constantly looking for feedback about this modeler, if you think something is missing, some behavior is weird or even just to tell us you are happy with it in its current state, please come and exchange on the Obeo Network
Fill in our survey!

Feel free to fork the code, adapt it for your need and trigger a pull request.

Getting Started

This section describes how to start using the UML designer either from existing UML models or by creating a new one.

Starting from the Travel Agency example

Import the TravelAgency project using the menu File/New/Example....

Pick the Travel Agency UML wizard and click on Next and then Finish.

Click Finish on the wizard and a TravelAgency project appears in your workspace.

When the project gets opened, you will be greeted with the main package hierarchy diagram.

From here you can navigate to existing diagrams by right clicking on the Model.

Create a new UML model & UML project

To create a new UML project , enable the Modeling Perspective.

Then click on the wizard shortcuts at the top-right of the Eclipse Workbench. Select New UML Project.

You can choose specific name for the project and the root element for the project on the next pages.

When you press the Finish button, the projects gets created and automatically enabled the UML viewpoints.

Now you can right click on the displayed package to create all the available diagrams or use the palette to create the package structure that fits to your needs. You can also open the Package hierarchy diagram and starts from here:

Display & edit an existing UML model

To create a new UML design on existing UML models, simply drag & drop the models in the Project or use the Add Model action available on the Project Dependencies item.

UML designer viewpoints

Two viewpoints are specified on the UML designer each bringing the following views:

  • UML Structural modeling
    • Package hierarchy diagram
    • Class diagram
    • Component diagram
    • Object diagram
    • Composite diagram
    • Deployment diagram
  • UML Behavioral modeling
    • State machine diagram
    • Activity diagram
    • Use case diagram
    • Sequence diagram
  • UML Profile Design
    • Profile diagram

You can select either viewpoints or both depending on your use case. Note that the Package hierarchy diagram is the entry point to create new diagrams such as Activity or Sequence diagrams. So it is advised to select at least the UML Structural modelingviewpoint.

Using the Package Hierarchy Diagram

The Package Hierarchy diagram is the starting point of your modeling task. It shows you 
the structure of your model (packages and sub-packages) and enable the creation of the other diagrams.

Creating a Class Diagram

To create a class diagram you should right-click on your model or on a package and pick navigate and then new Class Diagram.

Creating a Deployment Diagram

To create a deployment diagram you should right-click on your model or on a package and pick navigate and then new Deployment Diagram.

Using the Class Diagram

Creating Elements

All the elements you can create in a class diagram are available through the palette.

You also have the ability to create elements in a contextual way related to the currently selected elements.
If your pointer is on the diagram background, after a few seconds you should see the following assistant :

If your pointer is on a class the assistant will be :

Editing Elements

Generality

The generic way to edit element values is using the properties view. If it is not opened yet
you can open it clicking on the Window menu, then Show View and then Properties

To edit a property you should then enable the Semantic tab :

Generic Class

To define a Generic Class, use the direct edit tool:

To define a Binding, use the create edge tool called “Binding” from a Class to a Generic Class.
You may notice that “?” refers to an undefined actual type:

To specify the binding association from the formal to the actual type use also the direct edit tool:

Using UML in colors

UML in colors is an object modeling technique proposed by Peter Coad, Eric Lefebvre, and Jeff De Luca in a series of articles in 1999.

An Archetypes layer is available in the UML Designer class diagram.

When the layer is selected, new tools are available in the palette :

The modeling in color patterns and strategies are built around the idea of class archetypes.

It exists four different kind of archetypes :

  • moment-interval and mi-detail (pink): represents a moment or interval of time, all things that happen in the software.
  • role (yellow): represents something/someone who participates to moment-intervals.
  • description (blue): represents a collection of values a kind of catalog.
  • party, place, or thing (green): represents someone or something that plays a role.

The Domain Neutral Component (DNC) is the common pattern applied with the UML in colors technique.

To create an archetype in a class diagram just select an archetype from the palette of the tooltip.
The archetypes are stored in UML model as stereotyped classes.
To change an existing class to an archetype just selects the tool from the palette and the existing class. The stereotype of the selected archetype is applied on the class which is colored.

UML in colors examples are available from Eclipse menu File > New > Example… > UML > Uml in colors.

For more detailed explanation on UML in colors have a look to Peter Coad’s website.

Editing Attributes

We added a few accelerators so that you can quickly edit Attributes in a class just by typing the label. Typing :

  • aNewName will update the attribute name.
  • aNewName : SomeType will update the attribute name and will look for the datatype with the given name. If found it will
  • /someName will set the Attribute as derived.
  • =someValue will set the default value of the Attribute.
  • [0..1] will set the multiplicity of the attribute to 0 for the lower bound and 1 for the upper bound.
  • [0..*] will set the multiplicity of the attribute to 0 for the lower bound and unbounded for the upper bound.

Using the Deployment Diagram

Creating Elements

All the elements you can create in a deployment diagram are available through the palette.

You also have the ability to create elements in a contextual way related to the currently selected elements.
If your pointer is on the diagram background, after a few seconds you should see the following assistant :

If your pointer is on a node the assistant will be :

In deed, a node is a composite element.

Editing labels

We added a few accelerators so that you can quickly edit labels on elements or edges just by typing. Typing :

  • aNewName will update the label.

Using the Profile Diagram

Creating a profile

To create a new profile, right_click on a model element in the Model Explorer and select the menu New Representation > Profile Diagram_.
!using_profile_diagram/new_profile_diagram
menu.png!

Another solution is to create a new UML model and select Profile as root element.

Creating a stereotype

A tool is available in the palette to create a stereotype. 

By default, a stereotype does not extend any metaclass.

Referencing a metaclass

A tool is available in the palette to import a list of metaclass.

It opens a wizard which proposes all the available UML metaclass:

It is possible to filter the listed metaclass by :

  • Name
  • Only concrete metaclasses
  • Only sub classes of a selected metaclass

Extending a metaclass

A tool is available in the palette to create extensions for a stereotype.


According to the context, this tool will create an Extension edge linking Stereotype to an Element Import or a Generalization edge linking two Stereotypes. An Element Import is an UML reference to an imported metaclass in a profile.

Extra associations

This tool allows the creation of an UML “Association” between two stereotypes. 

Furthermore, this tool can suggest to reuse the existing relationship in the metamodel UML, if this relationship can link the metaclass referenced by the target and the source stereotype of the wanted association.
If the user selects an existing relationship of the UML metamodel, then the tool will import the metaclass of the selected relationship and create a new stereotype that extend this relationship. Besides, the tool link graphically the new created stereotype and the source and target stereotype of the association

Defining a profile

The palette provides a tool to define a profile in order to be able to apply this one for other UML model in the workspace. This tool add information about the version to the profile as Ecore Annotation. Mainly, the information required for the versioning are:

  • Version number
  • Date
  • Author
  • Comment
  • Copyright

Another tool is available to undefine a profile, this tool removes all the EPackage representing the definition from the profile.

Exporting a profile

An export profile tool is available from the palette to export a profile as a jar file. This jar can be added to an eclipse platform to provide a profile as a registered package. The export operation creates an EMF project with an ecore file based on the profile model. Then an extension for the profile is added to the generated project (in “uml.generated_package” and “ecore.uri_mapping”). Finally, the tool builds and exports the created EMF project for the profile as a Deployable plug-in.
The tool requires some necessary information for the creation of the deployable plug-in:

  • Profile name, which is editable in the profile model.
  • Profile URI.
  • Profile plug-in name.
  • Version information

Features

Class Diagram

Introduction

Support for Broken Associations

It might happen that for some reason you have an Association instance in your package which doesn’t have the proper ends. In that case
the class diagram will show the broken associations as nodes :

!features/class_pics/broken associations Class Diagram.jpg!

You can use the Association tools in the palette (Association, Reference, Composition and Aggregation) to re-attach the Association to a classifier.

Classes in SubComponents

Class Diagram created on a Package or a Model will display the contained classes but also the classes which are contained in Components of the selected Package.

Thanks to this one can easily define a Class Diagram displaying all the entities abstracting the fact that they might be split across components.

Component Diagram

Introduction

!features/agency_pics/system architecture.jpg!

Connector

You can link two ports using assembly or delegation connectors.

Assembly Connector :

!features/component_pics/assembly connector.jpg!

Delegation Connector :

!features/component_pics/delegation connector.jpg!

Composite Components

!features/component_pics/composite components.jpg!

Using Class

As a component :

!features/component_pics/class as component.jpg!

In a component :

!features/component_pics/implementation classes in component.jpg!

Required and Provided Interfaces

Using ports :

!features/component_pics/exchange through ports.jpg!

Or directy on the components :

!features/component_pics/exchange through component.jpg!

Use Case Diagram

Introduction

!features/agency_pics/system use cases.jpg!

Use cases with or without subjects

The Use Case Diagram will display any UseCase not being affected to a subject on the canvas. If a subject is affected, then the use case
will be displayed directly within this subject.

Dragging a use case from a subject to the canvas (and the other way around) will set or unset the subject accordingly.

Activity Diagram

Introduction

!features/agency_pics/to reserve a trip.jpg!

State Machine Diagram

Introduction

Sequence Diagram

Deployment Diagram

Introduction

Artifact dependency and generalization

Artifact manifestation of packageable elements

Artifact deployment


We have two way to deploy an artifact:

  • Deployment could be shown as a deploy dependency that is drawn from the artifact to the deployment target.
  • Deployment could also be shown with deployed artifacts contained by a deployment target.

Device, Execution Environment, Node and links.

Composite Nodes



https://github.com/ObeoNetwork/UML-Modeling/blob/master/plugins/org.obeonetwork.dsl.uml2.design.doc/doc/UML%20Designer%20User%20Guide.textile


  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
UML 建模工具介绍 应用最广的由两种种1. Rational Rose,它是ibm的 。2.Microsoft的 Microsoft Office Visio® 2003 3.Enterprise Architect。还有其他工具如PowerDesigner等1.Rational Rose是一种基于UML的建模工具。在面向对象应用程序开发领域,Rational Rose是影响其发展的一个重要因素。Rational Rose自推出以来就受到了业界的瞩目,并一直引领着可视化建模工具的发展。越来越多的软件公司和开发团队开始或者已经采用Rational Rose,用于大型项目开发的分析、建模与设计等方面。从使用的角度分析,Rational Rose易于使用,支持使用多种构件和多种语言的复杂系统建模;利用双向工程技术可以实现迭代式开发;团队管理特性支持大型、复杂的项目和大型而且通常队员分散在各个不同地方的开发团队。同时,Rational Rose与微软Visual Studio系列工具中GUI的完美结合所带来的方便性,使得它成为绝大多数开发人员首选建模工具;Rose还是市场上第一个提供对基于UML的数据建模和Web建模支持的工具。此外,Rose还为其他一些领域提供支持,如用户定制和产品性能改进。具体介绍可参看http://www.uml.org.cn/RequirementProject/200604043.htm2.Visio® 2003的简介请看http://www.uml.org.cn/UMLTools/psf/Guide.dochttp://www.microsoft.com/china/office/xp/visio/default.asp3.Enterprise ArchitectEnterprise Architect是一个全功能的、基于UML的visual CASE工具,主要用于设计、编写、构建并管理以目标为导向的软件系统。它支持用户案例、商务流程模式以及动态的图表、分类、界面、协作、结构以及物理模型。此外,它还支持C++、Java、Visual Basic、Delphi、C#以及VB.Net。 具体可看http://www.softwarechn.com/SparxSystems/sparxsystems_index.htm4.PowerDesigner工具简介请看http://www.uml.org.cn/UMLTools/powerDesigner/powerDesignerToolIntroduction.htm5.EA与Rose UML建模工具比较http://51cmm.csai.cn/casepanel/ST/No061.htm6.uml介绍请看uml中国官方网站,这里有很多关于uml建模和建模工具的介绍http://www.uml.org.cn

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值