eclipseのUMLプラグインのインストールと使用
1.据え付け
eclipseはオープンソースです。持参機能を安心して使え!!(
1.1先にGEFを取り付ける
help-->Install New Software-->heliosを入力して、http://download.eclipse.org/releases/helios
1.2 AmaterasUMLをインストールする
help-->Install New Software->Amaterasを入力して、http://takezoe.github.io/amateras-update-site はインストールが完了するのを待って、再起動すればいいです。
1.3 PlantUMLのインストール
Help-->Install new software->入力PlantUML-http://plantuml.sourceforge.net/updatesite/ 次のような画面があります。 next-->アカウントのパスワードを入力したい時はキャンセルすればいいです。インストールが完了したら、PlantUMLが見えないなら、Quick Accessで直接検索できます。そしてダブルクリックして開きます。!次にtxtファイルを作成します。コードを入力すると、対応する図が現れます。
2.クラス図を生成する(class diagram)
File-->new-->otherは、生成するものを選択します。は、その後、cldファイルを入手し、工事中のカバンの中のjavaファイルをドラッグして結果を見ることができます。
3.活動図を生成する(activity diagram)
3.1基本文法
3.1.1開始終了
3.1.2条件文
if then else
elseif
3.1.3循環構造
繰り返しループ
キーワードrepeatとrepeawhileを使って反復サイクルができます。
whileサイクル
3.1.4並列処理
fork,fork again,end forkは並列処理を表します。
3.1.5コメント
3.1.6色
3.1.7矢印
マークを使用すると、矢印にテキストを追加したり、矢印の色を変更したりできます。また、ドット状、棒状、太字、または隠し矢印を選択することもできます。
3.1.8グループ(grouping)
パーティションを定義することで、複数の活動を組み合わせることができます。
3.1.9コース(swimlans)
パイプを使ってコースを定義したり、コースの色を変えることができます。
3.1.10分離(detach)
矢印はdetachで削除できます。
4.判例図を生成する(usecase diagram)
eclipseはオープンソースです。持参機能を安心して使え!!(
1.1先にGEFを取り付ける
help-->Install New Software-->heliosを入力して、http://download.eclipse.org/releases/helios
1.2 AmaterasUMLをインストールする
help-->Install New Software->Amaterasを入力して、http://takezoe.github.io/amateras-update-site はインストールが完了するのを待って、再起動すればいいです。
1.3 PlantUMLのインストール
Help-->Install new software->入力PlantUML-http://plantuml.sourceforge.net/updatesite/ 次のような画面があります。 next-->アカウントのパスワードを入力したい時はキャンセルすればいいです。インストールが完了したら、PlantUMLが見えないなら、Quick Accessで直接検索できます。そしてダブルクリックして開きます。!次にtxtファイルを作成します。コードを入力すると、対応する図が現れます。
2.クラス図を生成する(class diagram)
File-->new-->otherは、生成するものを選択します。は、その後、cldファイルを入手し、工事中のカバンの中のjavaファイルをドラッグして結果を見ることができます。
3.活動図を生成する(activity diagram)
3.1基本文法
3.1.1開始終了
@startuml
start
:Hello world;
:This is on defined on
several **lines**;
stop
@enduml
は、endキーを使用してもよい。@startuml
start
:Hello world;
:This is on defined on
several **lines**;
end
@enduml
3.1.2条件文
if then else
@startuml
start
if (Graphviz installed?) then (yes)
:process all
diagrams;
else (no)
:process only
__sequence__ and __activity__ diagrams;
endif
stop
@enduml
elseif
@startuml
start
if (condition A) then (yes)
:Text 1;
elseif (condition B) then (yes)
:Text 2;
stop
elseif (condition C) then (yes)
:Text 3;
elseif (condition D) then (yes)
:Text 4;
else (nothing)
:Text else;
endif
stop
@enduml
3.1.3循環構造
繰り返しループ
キーワードrepeatとrepeawhileを使って反復サイクルができます。
@startuml
start
repeat
:read data;
:generate diagrams;
repeat while (more data?)
stop
@enduml
whileサイクル
@startuml
start
while (data available?)
:read data;
:generate diagrams;
endwhile
stop
@enduml
3.1.4並列処理
fork,fork again,end forkは並列処理を表します。
@startuml
start
if (multiprocessor?) then (yes)
fork
:Treatment 1;
fork again
:Treatment 2;
end fork
else (monoproc)
:Treatment 1;
:Treatment 2;
endif
@enduml
3.1.5コメント
@startuml
start
:foo1;
floating note left: This is a note
:foo2;
note right
This note is on several
//lines// and can
contain HTML
====
* Calling the method ""foo()"" is prohibited
end note
stop
@enduml
3.1.6色
@startuml
start
:starting progress;
#HotPink:reading configuration files
These files should edited at this point!;
#AAAAAA:ending of the process;
@enduml
3.1.7矢印
マークを使用すると、矢印にテキストを追加したり、矢印の色を変更したりできます。また、ドット状、棒状、太字、または隠し矢印を選択することもできます。
@startuml
:foo1;
-> You can put text on arrows;
if (test) then
-[#blue]->
:foo2;
-[#green,dashed]-> The text can
also be on several lines
and **very** long...;
:foo3;
else
-[#black,dotted]->
:foo4;
endif
-[#gray,bold]->
:foo5;
@enduml
3.1.8グループ(grouping)
パーティションを定義することで、複数の活動を組み合わせることができます。
@startuml
start
partition Initialization {
:read config file;
:init internal variable;
}
partition Running {
:wait for user interaction;
:print information;
}
stop
@enduml
3.1.9コース(swimlans)
パイプを使ってコースを定義したり、コースの色を変えることができます。
@startuml
|Swimlane1|
start
:foo1;
|#AntiqueWhite|Swimlane2|
:foo2;
:foo3;
|Swimlane1|
:foo4;
|Swimlane2|
:foo5;
stop
@enduml
3.1.10分離(detach)
矢印はdetachで削除できます。
@startuml
:start;
fork
:foo1;
:foo2;
fork again
:foo3;
detach
endfork
if (foo4) then
:foo5;
detach
endif
:foo6;
detach
:foo7;
stop
@enduml
4.判例図を生成する(usecase diagram)