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

本文档提供了使用ObeoDesigner进行UML建模的全面指南,包括如何创建和编辑UML模型,利用各种视图和图示来组织和展示模型结构,并介绍了如何应用UML颜色技术和配置剖面。
部署运行你感兴趣的模型镜像

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


您可能感兴趣的与本文相关的镜像

EmotiVoice

EmotiVoice

AI应用

EmotiVoice是由网易有道AI算法团队开源的一块国产TTS语音合成引擎,支持中英文双语,包含2000多种不同的音色,以及特色的情感合成功能,支持合成包含快乐、兴奋、悲伤、愤怒等广泛情感的语音。

DataUml Design 是面向开发人员使用的一个永久免费的软件,提高软件的开发效率和代码的规范度。它主要包括三大功能,数据模型、代码生成和UML建模,数据模型功能类似于PowerDesigner软件,代码生成类似于动软的代码生成器. DataUml Design是采用WPF开发的一款软件,该软件功能包括实体类建模、数据库设计、模型与数据库同步、数据库与模型同步、代码生成、文档生成、数据库生成实体模型等功能。以往的软件修改模型之后还得修改数据表结构,需要同步修改两个地方,而DataUml Design解决了该问题, 软件开发人员只需要修改模型结构或数据表结构,然后利用软件的同步功能即可达到模型与数据表结构的一致性。方便开发人员轻轻松松地管理自己的模型与数据库。 DataUml Design的自定义模板采用微软的4T技术,开发人员可以配置自己的代码模板。如实体层、数据访问层和UI层都可以用模板来配置,由模型一键生成代码,实现模型与代码的一致性。 DataUml Design支持数据的导入与导出,可以导出模型结构的文档,也支持其实数据导入生成数据模型(下一版本将实现)。 DataUml Design目前只支持MS Server和Oracle数据库、C#和Java语言,其它数据库和语言下一版本将实现。 DataUml Design功能特点 1)、模型设计 DataUml Desing数据建模采 用图形化设计,基于UML标准,遵循UML类图概念。模型中的类和数据库中的表对应,类的成员分为字段、属性、事件等,类的属性对应数据表中的字段。类的 属性成员的属性又包括数据表中字段的所有属性。类与类的关联关系包括单向关联、双向关联、组合、聚合。关联关系与数据表中的外键相对应。关联关系也具有属 性。 2)、模型和数据库同步 数据模型与数据库绑定,设计模型之后可以一键把模型提交到绑定的数据库中,如果数据库中表存在,则会更新数据表结构,如果数据库中代不存在,则会创建一张新表,用户不需要关心如何数据库类型,DataUml Design会帮你完成所有功能。 如果数据表中增加了字段或修改了某个字段,需模型中需没有更改,只需把数据表同步到模型即可,不需要开发人员对照数据表结构来修改模型结构。 3)、代码生成 DataUml Desing采用代码模板来生成代码,软件开发人员可以根据自己的要求来设计代码模板。代码模板可以生成任务语言的代码。软件开发人员可以用代码模板获取到类的所有属性以及关联的类。 软件下载地址: www.netuml.com
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值