tpc 5.0.0 quick start editor tutorial

56
TOPCASED 5.0.0 Quick start editor tutorial Raphaël Faudou Benjamin Marconato

Upload: alex-cevallos

Post on 21-Sep-2014

72 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: TPC 5.0.0 Quick Start Editor Tutorial

TOPCASED 5.0.0 Quick start editor tutorial

Raphaël Faudou

Benjamin Marconato

Page 2: TPC 5.0.0 Quick Start Editor Tutorial

2 Topcased quick start tutorial

Agenda

• What’s new in this tutorial

• Create a TOPCASED project/model

• Edit a diagram

• Document the model elements

• Autoresize the diagram

• Export the diagram as an image

• Add a diagram

• Rename a diagram

• Move a diagram

• Import from Model

• Adjust the structure of the model

• Virtual Order

• Validate the model

• Navigation in the diagrams

• Generic transformation on an element

• Version management of models

• Collaborative work

• Search the models

• Requirement Import

• Export HTML

• Customize the palette

• Refresh Diagram

• Generate default documentation from your model

Page 3: TPC 5.0.0 Quick Start Editor Tutorial

3 Topcased quick start tutorial

What’s new since previous release (4.1)

• You can consult the release note to find all news on TOPCASED 5.0.0RC1:

http://www.topcased.org/index.php?idd_projet_pere=52&Itemid=60

• Generate default documentation from your models (sl. 53-54-55)

Page 4: TPC 5.0.0 Quick Start Editor Tutorial

4 Topcased quick start tutorial

Create a TOPCASED project

• TOPCASED Perspective Helps in creating the project

• A project of type « TOPCASED » is created with a « models » directory

Page 5: TPC 5.0.0 Quick Start Editor Tutorial

5 Topcased quick start tutorial

Create a new model (1/2)

• Blank model or a model created based on a template (structure and diagrams)

Different templates according to the editor

Possibility to add other custom templates (plug-in)

Page 6: TPC 5.0.0 Quick Start Editor Tutorial

6 Topcased quick start tutorial

Create a new model (2/2)

Two files

Model data (stored in xxx.uml)

Diagram data (stored in

xxx.umldi, with

reference to xxx.uml)

UML model and

diagram data, available

in the outline view

Graphical model-based editor

Property view, contextual to the selection

Page 7: TPC 5.0.0 Quick Start Editor Tutorial

7 Topcased quick start tutorial

Edit a diagram (1/8)

• Open the use case diagram (double click on it in the outline view)

Create an actor via the palette : an item is added to the « outline » view (model)

The documentation view enables commenting on current item

Page 8: TPC 5.0.0 Quick Start Editor Tutorial

8 Topcased quick start tutorial

Edit a diagram (2/8)

• Dealing with mistakes Let us suppose we want first to focus on use cases We can delete actors from the current diagram

Please notice that both actors remain visible in the model (outline view)- It is because we deleted them from diagram only (not from the model)

Page 9: TPC 5.0.0 Quick Start Editor Tutorial

9 Topcased quick start tutorial

Edit a diagram (3/8)

• Now let us create use cases

from the palette

• Linking actors and UC

We can create new actors from the palette…

… or retrieve existing ones from the model (outline view) by drag-and-drop

And then create association between actors and use cases

Drag & drop

Page 10: TPC 5.0.0 Quick Start Editor Tutorial

10 Topcased quick start tutorial

Edit a diagram (4/8)

• Multi creation element

You can create several elements by pressing ctrl

Select an element from the palette, press ctrl, click on the diagram as many

time as you want to create elements

Page 11: TPC 5.0.0 Quick Start Editor Tutorial

11 Topcased quick start tutorial

Edit a diagram (5/8)

• Properties of a model item (« Properties » view)

Most commonly used properties are in the « model » tab

All the properties are in « advanced » tab

Page 12: TPC 5.0.0 Quick Start Editor Tutorial

12 Topcased quick start tutorial

Edit a diagram (6/8)

• Graphical properties linked to the diagram (no item selected)

Colors, font, print format

List of print formats can be modified in the TOPCASED preferences

Page 13: TPC 5.0.0 Quick Start Editor Tutorial

13 Topcased quick start tutorial

Edit a diagram (7/8)

• Graphical properties available for the selected item(s)

Adapted to item type (node, connection…)

Page 14: TPC 5.0.0 Quick Start Editor Tutorial

14 Topcased quick start tutorial

Edit a diagram (8/8)

• Default behavior

Workspace level (preferences) or project level (right click « properties »)

Entirely generic (all languages and all items of the language)

Page 15: TPC 5.0.0 Quick Start Editor Tutorial

15 Topcased quick start tutorial

Document the model elements

• A note can be used for diagram only

not stored in the model

• Each model element can be documented through a documentation view

Simple text

Rich Edit text with a dedicated editor

- Bold, copy/paste…

- Tables, images, links…

- Ctrl M or Ctrl Shift M to go next line

- Support diagram / element link

Page 16: TPC 5.0.0 Quick Start Editor Tutorial

16 Topcased quick start tutorial

• If a diagram is selected

The element documented through the documentation view is the diagram

Document the model elements

Page 17: TPC 5.0.0 Quick Start Editor Tutorial

17 Topcased quick start tutorial

Autoresize the diagram

• Before, some parts of the A4 diagram format are blank…

• After, the diagram format has been adapted to its content

Page 18: TPC 5.0.0 Quick Start Editor Tutorial

18 Topcased quick start tutorial

Export the diagram as an image

• Export the current diagram

Contextual menu « export file » then select the directory and the format

• Export all the diagrams

Select xxx.umldi file

Contextual menu « export All Diagrams… »

(then select the directory and the format)

Page 19: TPC 5.0.0 Quick Start Editor Tutorial

19 Topcased quick start tutorial

• Select a package from Outline view For instance the model (root package)

• Add (create) a diagram via the contextual menu

• Change the name in the properties view For instance « overview »

• Edit the diagram with the palette

• Or drag existing items from the outline view……to drop them on the new diagram Example : the main packages (UC view,…)

• Remark : an UML item decorated with green arrow means it contains sub-diagrams

Add a diagram (1/3)

Page 20: TPC 5.0.0 Quick Start Editor Tutorial

20 Topcased quick start tutorial

Add a diagram (2/3)

• Remark : some diagrams cannot be directly created in a package The UML metamodel imposes the creation of another UML item beforehand

- « activity » to create an activity diagram- « class » to create a composite structure diagram- « interaction » for sequence diagram, - « stateMachine” for state diagram

• Example : description of a use case through an activity diagram Select the use case “monitor equipment” in the outline Add an activity diagram with the contextual menu

An activity has been created below the use case

Page 21: TPC 5.0.0 Quick Start Editor Tutorial

21 Topcased quick start tutorial

Add a diagram (3/3)

• Other shortcuts : to add an activity diagram or a state machine diagram to a

CallBehaviorAction

Automatic association to current diagram

Automatic creation of the new diagram

Page 22: TPC 5.0.0 Quick Start Editor Tutorial

22 Topcased quick start tutorial

Rename a diagram (1/3)

• Until TOPCASED 3.3.0, diagrams were created with the default name “unnamed”.

Since TOPCASED 3.3.0, they are created by default with the name of their

container

• Diagrams can have invalid names that may cause errors

duplicate names

invalid name

Page 23: TPC 5.0.0 Quick Start Editor Tutorial

23 Topcased quick start tutorial

Rename a diagram (2/3)

• Diagnose your model

A menu is available to check the validity of your diagrams name

Diagram names

valid

Diagram names

not valid

Page 24: TPC 5.0.0 Quick Start Editor Tutorial

24 Topcased quick start tutorial

Rename a diagram (3/3)

• Automatically rename your diagrams

Invalid characters are replaced by “_”

Duplicate names are kept, but an iterator is

added to the name :

- Main, Main1, Main2

Before After

Page 25: TPC 5.0.0 Quick Start Editor Tutorial

25 Topcased quick start tutorial

Move a diagram

• You can move a diagram by drag and drop :

• only diagrams contained in a package are moveable

Ask for confirmation, display the

impacted resources

Page 26: TPC 5.0.0 Quick Start Editor Tutorial

26 Topcased quick start tutorial

Import from Model

• Copy model elements from another model :

Page 27: TPC 5.0.0 Quick Start Editor Tutorial

27 Topcased quick start tutorial

Adjust the structure of the model (1/4)

• Requirement to adapt the initial template

Create sub-systems, functional domains…

• Create a package

Either from outline view (CreateChild contextual menu)

Or by the palette in the class diagram or use case diagram

Example : separate actors and use cases in the use case view

- Create package “actors” and package “domains”

Page 28: TPC 5.0.0 Quick Start Editor Tutorial

28 Topcased quick start tutorial

Adjust the structure of the model (2/4)

• Copy or move a part of the model Drag-and-drop or make a duplicate of a sub-tree in the outline

• Example : Move the actors to “actors” package and UC to functional domains

• Remark: duplicating a sub-tree of the model duplicates the diagrams

Page 29: TPC 5.0.0 Quick Start Editor Tutorial

29 Topcased quick start tutorial

Adjust the structure of the model (3/4)

• Register your own template model

Select a *di file (umldi, samdi,

symldi...), an action is available

to create a new plugin

containing the new template.

This action is shown on a right

click, through 'Topcased' menu,

'Convert to Template plugin...”.

Page 30: TPC 5.0.0 Quick Start Editor Tutorial

30 Topcased quick start tutorial

Adjust the structure of the model (4/4)

• Register your own template model

Once the plugin is deployed on

your platform, you can see your

template on the wizard “New UML

Model with TOPCASED” and

create a new model according to

this template.

Page 31: TPC 5.0.0 Quick Start Editor Tutorial

31 Topcased quick start tutorial

Virtual order (1/2)

• Select in the outline the menu “Virtual Order” to enable moving elements bellow a

container without any restrictions.

• To see if elements have notion of virtual order there is a decorator in the outline

(V).

Page 32: TPC 5.0.0 Quick Start Editor Tutorial

32 Topcased quick start tutorial

Virtual order (2/2)

• It is also possible to initialize order for an element according to a semantic using

right click on a container and select "Automatic Virtual Order". It will make the

order of the container virtual and will sort children with automatic algorithms.

• If many algorithms exist, a dialog asks you to choose the algorithm you want to

apply.

Page 33: TPC 5.0.0 Quick Start Editor Tutorial

33 Topcased quick start tutorial

Validate the model

• TOPCASED validation check if your model is

conform to the UML specification

• Click on the validate button in the tool bar

• Errors and warnings are shown in the

problems view and on elements in diagrams

and outline view

• To remove the warnings just delete them in

the problem view

Page 34: TPC 5.0.0 Quick Start Editor Tutorial

34 Topcased quick start tutorial

Navigation in the diagrams (1/6)

• Arrow cursor to navigate in the diagrams

Previous, next, parent, main (root) diagram

• Some UML items (containers) allow navigation to children diagrams

Double click on the item (package, class…)

A creation wizard is displayed if no child diagram is defined

Example : let us drag and drop the “domains” package in the UC diagram

- Then, let us double click on the “domains” package in the diagram

- A wizard is displayed : let us choose “use case diagram”…

Page 35: TPC 5.0.0 Quick Start Editor Tutorial

35 Topcased quick start tutorial

Navigation in the diagrams (2/6)

• Double click on an item containing several children diagrams

A list of diagrams is displayed to the user so that he can make a choice

Example

1. Create a new UC diagram in the use case view

2. Drag & drop “actors” and “domains” packages

3. Select now the “overview diagram” by clicking the “root diagram” arrow

4. Double click on the “use case view” …

…A list of two diagrams is displayed

Page 36: TPC 5.0.0 Quick Start Editor Tutorial

36 Topcased quick start tutorial

Navigation in the diagrams (3/6)

• Navigation from a model item in outline view (double click) If the item is present in a single diagram, this diagram is open If the item is present in several diagrams, a list is displayed Example : double click on “monitor equipment” use case

If the item is not present in any diagram, double click is inactive

Page 37: TPC 5.0.0 Quick Start Editor Tutorial

37 Topcased quick start tutorial

Navigation in the diagrams (4/6)

• Navigation from TOPCASED navigator view

Diagrams are shown by name and are flat

• Navigation from Outline view

Possibility of filtering only the diagrams

Or create filters on UML types

Page 38: TPC 5.0.0 Quick Start Editor Tutorial

38 Topcased quick start tutorial

Navigation in the diagrams (5/6)

• Navigation from a use case

A use case does not have sub-diagrams (not allowed by UML metamodel)

However navigation is possible if there is a diagram linked to UC behavior

Example : activity behavior for UC “monitor equipment”

Double click

Page 39: TPC 5.0.0 Quick Start Editor Tutorial

39 Topcased quick start tutorial

Navigation in the diagrams (6/6)

• Filter the outline to search specific elements

You can press F1 to have contextual help enabled:

• To enable case sensitive search, check the corresponding

option

• It is possible to auto-select the elements matched by the search

if the preference is enabled (Preferences > Topcased > Editors)

Page 40: TPC 5.0.0 Quick Start Editor Tutorial

40 Topcased quick start tutorial

Generic transformation on an element

• For any element in TOPCASED it’s possible to transform it into another element

For the chosen element, the feature will check what kind of type the model can contain and will provide

a list of possible target for transformation.

After the type chosen the selected element is transformed into the desired type and the relations are

kept.

If some links are not compatible, a pop up appears explaining why the process can't continue.

- It's possible to transform an element into another which is not displayed graphically in TOPCASED.

OR

Page 41: TPC 5.0.0 Quick Start Editor Tutorial

41 Topcased quick start tutorial

Version management of models

• Local history provided by Eclipse

Page 42: TPC 5.0.0 Quick Start Editor Tutorial

42 Topcased quick start tutorial

Collaborative work

• If you want more information about collaborative work, see the tutorial

“Collaborative_Work_tutorial”.

Page 43: TPC 5.0.0 Quick Start Editor Tutorial

43 Topcased quick start tutorial

Search the models (1/2)

• Filter by language

• Text or Xpath mentioned

• Different scopes

Workspace

Working set

• UML search example

Searching actors…

… in some given projects

Page 44: TPC 5.0.0 Quick Start Editor Tutorial

44 Topcased quick start tutorial

Search the models (2/2)

• Results provided in the search view

• Double click place on the UML model

• Placement on the diagrams not possible for 2.0

Page 45: TPC 5.0.0 Quick Start Editor Tutorial

45 Topcased quick start tutorial

Requirement Import

• You can access the last version of the dedicated tutorial for requirements import

from the link below:

http://gforge.enseeiht.fr/docman/?group_id=112# , inside « Tutorial » section.

Page 46: TPC 5.0.0 Quick Start Editor Tutorial

46 Topcased quick start tutorial

Export HTML (1/3)

• You can export your model as an HTML site (like javadoc with Java).

Page 47: TPC 5.0.0 Quick Start Editor Tutorial

47 Topcased quick start tutorial

Export HTML (2/3)

• The HTML Site generated

Documentation of the current element

Navigation button between page, like Topcased

Site map

Diagram

Page 48: TPC 5.0.0 Quick Start Editor Tutorial

48 Topcased quick start tutorial

Export HTML (3/3)

• Display of the documentation of an element

When the mouse is over an element (here UseCase1),

the documentation is displayed in “Documentation” frame

• Hyperlinks inside documentation

Warning : If the documentation contains hyperlinks,

keep CTRL key pressed before clicking on the hyperlink

(in order to keep the focus of Documentation frame on

this particular element)

Page 49: TPC 5.0.0 Quick Start Editor Tutorial

49 Topcased quick start tutorial

Customize the paletteRegister to the extension point

• Create a plug-in

• Open the plugin.xml, Extensions tab uncheck the « show only extension point from required plug-ins » option

• Register to the extension point « org.topcased.modeler.paletteConfiguration » Create a new configuration

- The name is the label displayed in the preference page Add to the configuration a diagramSpecificPalette

- the id is the id of the target diagram

Add to the diagramSpecificPalette as many

paletteElement as needed

- The name must be the same as the

palette label

• Install into the plateform

Plugin.xml > Overview > Export Wizard >

Install into host, Repository > Finish

Restart TOPCASED

Page 50: TPC 5.0.0 Quick Start Editor Tutorial

50 Topcased quick start tutorial

Customize the paletteDiagrams List

• UML Class Diagram : org.topcased.modeler.uml.classdiagram Use case Diagram : org.topcased.modeler.uml.usecasediagram Activity Diagram : org.topcased.modeler.uml.activitydiagram Component Diagram : org.topcased.modeler.uml.componentdiagram Composite Structure Diagram : org.topcased.modeler.uml.compositestructuresdiagram Deployment Diagram : org.topcased.modeler.uml.deploymentdiagram Sequence Diagram : org.topcased.modeler.uml.sequencediagram State machine Diagram : org.topcased.modeler.uml.statemachinediagram

• SysML Block Definition Diagram: org.topcased.modeler.sysml.blockdefinitiondiagram Internal Block Diagram: org.topcased.modeler.sysml.internalblockdiagram Parametric Diagram: org.topcased.modeler.sysml.parametricdiagram Profile Diagram: org.topcased.modeler.sysml.profilediagram Requirement Diagram : org.topcased.modeler.sysml.requirementdiagram

• AUI AUI Diagram : org.topcased.modeler.aui.diagrams

• SAM System Diagram: org.topcased.modeler.sam.systemdiagram Automaton Diagram: org.topcased.modeler.sam.automatondiagram

Page 51: TPC 5.0.0 Quick Start Editor Tutorial

51 Topcased quick start tutorial

Customize the paletteSet the preferences

• Open the preferences > Topcased >

Editors

Select in the combo box “Palette

configuration” your configuration

• Open a TOPCASED model

Page 52: TPC 5.0.0 Quick Start Editor Tutorial

52 Topcased quick start tutorial

Refresh Diagram

• Some refresh problems may still occur in TOPCASED. A new button is available to

force a graphical refresh, fixing these issues.

Page 53: TPC 5.0.0 Quick Start Editor Tutorial

53 Topcased quick start tutorial

Default document generation (1/2)

• You can generate a default documentation from your diagram (OpenOffice Writer :

MS Word document)

• Steps : Select menu « Generate documentation » from right click on your diagram file (.di, .umldi, .sysmldi,

.samdi,..)

Fill document generation wizard ( output file path and format)

Click « Finish »

Select output format

MS Word 2007 (.docx)

or OpenOffice Writer (.odt)

Select output directory

and file name

Page 54: TPC 5.0.0 Quick Start Editor Tutorial

54 Topcased quick start tutorial

Default document generation (2/2)

• Exemple of pages from default

generation

• Content of generated document : A document relative to model

name

One paragraph per diagram found

in the model

Diagram as image

List of all elements contained in

diagram with :

- Associated documentation

- Associated requirements

Page 55: TPC 5.0.0 Quick Start Editor Tutorial

55 Topcased quick start tutorial

Generate documentation from your diagramusing TOPCASED Gendoc2

• You can also define your own Gendoc2 generation template.

See Gendoc2 tutorial for more information.

Page 56: TPC 5.0.0 Quick Start Editor Tutorial

56 Topcased quick start tutorial

Support

• More support about TPC quick start tutorial:

Mailing list « users »

- [email protected]

Atos Origin team

- [email protected]

- [email protected]