Revision model for Papyrus

Table of Contents

Requirements

- Versioning (id=Req_010): 
Papyrus must integrate versioning in order to display in comment author and date.
- VersionInfoReq (id=Req_011): 
Papyrus must integrate versionning. This information comes from O"4.3.2 Pre-Defined Metadata Elements" of the OASIS standard, "Open Document Format for Office Applications (OpenDocument) Version 1.2-Part 1: OpenDocument Schema".
- ReviewSystem (id=Req_020): 
Papyrus must integrate a review system to add comments with the possibility to respond to this comment. Each comment must have information about the user the date.
- RevisionMode (id=Req_030): 
Papyrus must integrate a means to make revision mechanism to register, accept or refuse modification done by an user
- IndependantReview (id=Req_021): 
It can exits several review models for one design “working model”. The working model is the current model edited by papyrus.
- LightRevisionMode (id=Req_040): 
The revison mode must be light as word sofware, it must not use a client server system as gerrit.

Use Cases

ReviewSystem

ReviewSystem UseCases


The functionality revision can be divided into two parts:

- Management of review

ReviewSystem

ReviewSystem UseCases


- Management of revisions

Revision

Revision mode Use Case


Review Tool

Add or change information about the current author for the versionning

When the user wants to add for the first time a review, the review system must ask the identity, the language and the wanted color of the user in order to add it in the associated review.

This information could be changed at any time in the preference of papyrus
How to
To do that the user can change this identidy by select Window menu --> preferences -->papyrus -->revision.

Set

Set new name in preferences


Respond to a review

A user could have the possibility to respond to an existing review. Thanks to this, it is possible to see the discussion flow about a subject. 
How to
In order to respond to a review:

- Select the review
- Click right and select menu new review.

Respond

Respond to a review


Add a review about the working model

The user can add review about element of the working model



How to
In order to reference an element from a review click right on review and choose hook menu.

It remains only to select the element in the dialog.

Review

Review references an element of the working model


Add, update or remove a review on the current model

The user adds a review on an element of the model. This review will be not directly store in the model but into a new model that will contain all review comments.

In order to create a review, the review tool can create a review model if needed.
The review tool creates also a "user author". From all preferences, the system creates an author that will associated to a review.
Finally this created review contains all informations see in the version information.

This review could be displayed on diagrams. A dedicated view must be displayed dedicated to review comment. (it can be sorted by date author, subject..)

Add

Add A review diagram


How to
In order to add a review:

- Launch the review editor. Window--> show view --> Review in the papyrus Category
- Click on the small comment with a plus.

Add

Add a Review


In order to remove a review click right on review and choose delete menu.

Delete

Delete a review


Create, load or save a review model

When a model is opened in papyrus. The user can :

- create a new revision model
- load a new revision model
- save a revision model.
The revision model cannot be opened without the associated "working model".

Open

Open save a review


Close WorkingModel or close review editor

When user close the papyrus where  the "working model" is edited, the review editor is closed

Revision Tool

Launch Revision mode

The user can launch revision mode. 

From this time all modifications will be register and associated to the user.
A modification could be:
- a deletion
- an adding
- a set of a property of the graphical model or the semantic model
How to
In order to launch the revision model:

1. open a papyrus model
2. open the review editor window--> show view--> review editor
3. load or create a review model
4. launch the revision model Revision--> RevisionModel

Launch

Launch the revision mode


Register all modifications with Versioning information

All modifications are store and associated to the current user.

A modification can be registered by using EMF Compare model. In the way, the requirement about light review system is respected. Server and client is not needed.
Each modification of emf compare is referenced by a review. In this way, information about versioning is associated to the modification.

Register

Register modifications


Stop RevisionMode

When the user stop the revision mode, modifications are not registered and done directly on the model.

How to
In order to stop the revision model:

1. go to the menu Revision--> RevisionModel
this menu is a check box.

Accept or refuse modifications

Thanks to registered modification the user can accept or refuse the modification.

If the modification is accepted, the adding or the deletion or the set is really done on the model, and the modification is removed from the stack.
If the modification is not accepted, the adding or deletion or the set is not applied, and the modification is removed from the stack.

See modifications in diagram

The user can see modifications that are done in the diagram

See modifications in model explorer

Thanks to registered modification the user can accept or refuse the modification.

If the modification is accepted, the adding or the deletion or the set is really done on the model, and the modification is removed from the stack.
If the modification is not accepted, the adding or deletion or the set is not applied, and the modification is removed from the stack.

Design

This tool uses two profiles:

- PapyrusVersioninExtension
- Review Profile

PapyrusVersioningExtensions

ProfileDiagram

ProfileDiagram


This profile proposes the set of UML extenssions dedictated to annotate model and model elements with versionning information. 

It is based on concepts defined in the chapter "4.3.2 Pre-Defined Metadata Elements" of the OASIS standard, "Open Document Format for Office Applications (OpenDocument) Version 1.2
- Part 1: OpenDocument Schema".

VersioningElement

An element under version contains a set of data:

- the generator attribute contains a string that identifies the OpenDocument producer that was used to create or last modify the document.
- the description attributes contains a description of a model element.
- the creationDate attribute specifies the date and time when a model element was created.
- the keyword attribute specifies a list of keywords pertaining to a model element.
- the date attribute specifies the date and time when the model elemeent was last modified.
- the language attribute specifies the default language of a document.
- the editingCycles attribute specifies the number of times a document has been edited. When a document is created, this value is set to 1. Each time a document is saved, the editing-cycles number is incremented by 1.
- the author attribute specifies the author that as create the element under version.

Author

This author is a person that has created the element under versioning.

The author has 3 attributes:
- the language, attribute used specifies the language spoken by the author.
- the color attribute specifies the color associated to an element under version.
- the versioningElements attribute specifies the list of elements that are under version

This stereotype can only applied on Actor.

ReviewProfile

Review

Review profile


This profile proposes the set of UML extensions dedictated to annotate model and model elements with review information. 

ReviewRepository

This stereotype is used to mark a model as a container of review. It is useful to distinguish a review model from another UML model.

Comment

This stereotype is a comment in the context of reives model.

It inherits a a versioningElement. It has got all data about the versioning.
Moreover, a comment contains several data useful in the context of the review:
- the attribute status specifies the state of the comment.
- the attribute diffef specifies the path to reference a modification in a model
- the attribute subject specifies the subject of a given comment.

Review

A review can be applied  to express a critical assessment about a model element.

Question

A question can be applied to express an interrogation  about a model element.

Todo

A todo stereotype can be applied to express an action or modification about a model element.

Plugin architecture

Plug-ins

Plug-ins architecture


org.eclipse.papyrus.revisiontool

org.eclipse.ui

org.eclipse.core.runtime

org.eclipse.emf.ecore

org.eclipse.uml2.types

org.eclipse.papyrus.infra.core

org.eclipse.papyrus.uml.tools

org.eclipse.emf.transaction

org.eclipse.papyrus.uml.extensionpoints

org.eclipse.ui.forms

org.eclipse.ui.views

org.eclipse.emf.edit.ui

org.eclipse.ui.views.properties.tabbed

org.eclipse.e4.ui.workbench.renderers.swt

org.eclipse.papyrus.infra.widgets

org.eclipse.papyrus.infra.services.labelprovider

org.eclipse.papyrus.infra.emf

org.eclipse.emf.compare

org.eclipse.emf.compare.rcp

org.eclipse.gmf.runtime.emf.type.core

org.eclipse.papyrus.emf.facet.custom.metamodel

org.eclipse.papyrus.emf.facet.custom.ui

org.eclipse.papyrus.emf.facet.efacet.core

org.eclipse.papyrus.emf.facet.query.java.core

org.eclipse.gmf.runtime.diagram.ui

org.eclipse.papyrus.uml.diagram.common

org.eclipse.papyrus.infra.gmfdiag.common

org.eclipse.papyrus.infra.gmfdiag.commands

org.eclipse.papyrus.infra.services.edit

org.eclipse.papyrus.views.properties

org.eclipse.papyrus.emf.facet.util.emf.core

Class architecture

Overview

Overview of the package architecture


Activator

The activator class controls the revision plug-in life cycle

advice

Class

Class Diagram of advice package


AdviceRemove
The purpose of this advice is to prevent remove during the running of the revision mode

When the remove is done during the activation of the revision model, a diff and a review are created in the review model

command

Class

Class Diagram of the command package


CreateDifferenceCommand
This command is used to attach a diff Element into the EMF compare model

CreateMatchCommand
This command is used to attach a Match Element into the EMF compare model


CreateToDoReviewCommand
This command is used to create a comment stereotyped "ToDo" with filled information about author and versioning


PreventRemoveCommand
 This class is used to register in the review model the proposition of a deletion 


core

Diagram

Diagram class of the core package


ReviewResourceManager
This class is used to manage the resource about the reviews and revisions.

It contains several important methods:
- load or get the current review model
- start and stop revision the connect or disconnect listener to register modification in the working model
- methods to access to the ServiceRegistry
AddingDiffListener
 This listener is used to register ADD ant SET about in the diff model during the launch of the  revision mode. It also create  review element in the review model.

See package commands for specification of review creation commands.

RefreshFigureListener
This listener is used to refresh figures when the revision mode has been used.


ui

GUI

GUI architecture


RevisonDiagLayer
This class is used to add figures in current diagrams for remove add or set during the revision mode.


AddingFig
This figure is about the adding of an element.


RemovedFig
This figure represents a remove of an element.


ReviewsEditor
 This class is the review editor that displays reviews or comments. This is an instance of a eclipse view. It references a content and label provider to display reviews. 


ReviewsTreeContentProvider
This is the content provider to display reviews in the review editor


ReviewsTreeLabelProvider
This is the label provider to display reviews for the review editor

SetFig
This figure specifies that  a change about an attribute has been done on an element


dialogs

ClassDiagram

ClassDiagram about dialog package


CreateAuthorDialog
This dialog is used to create an author that will add review or make revision.
CreateOrSelectReviewModelDialog
 This dialog is used to select or create a review model

handlers

Class

Class Diagram of the handlers package


AcceptReviewHandler
This handler is used to accept a ToDo revision.
RevisionAbstractHandler
This is an abstract handler that can be used by other handlers. it provides methods to get list of selected elements.


DeleteReviewHandler
This handler is used to remove a review from the review editor.

HookReviewHandler
This handler is used to connect a review to an element of the working model.

LaunchRevisionMode
This handler is used to launch the revision mode


RefuseReviewHandler
This handler is used to refuse a review from the review editor.

ReviewCreateHandler
This handler is used to create a review in the review editor

SaveSnapshotRevision
This handler is used to save a EMF compare model.

preference

ReviewPreferenceInitializer
Initialize preference constants about revision mode.
RevisionPreferenceConstants
Constant definitions for  the revision plug-in preferences
RevisionPreferencePage
This class is the preference page the revision tool.

queries

GetBackgroundColor
This class is query that returns the color of the element by taking account information about Compare model.
GetStrike
This class is query that returns the boolean. It returns true if the element is deleted from the Compare model

Tests

Review test

Create load a review

Test

Test about load a review model


Load a model without stereotypes
 The goal of this model is to test if a review model can be loaded even if it has no stereotypes have been applied on the comment of the review model

1. Open this model.
2. Load a review model named MyReview-lessModelStereo.
--> The review editor must display one review.
 The goal of this model is to test if a review model can be loaded even if it has no stereotypes have been applied on the review model

1. Open this model.
2. Load a review model named MyReview.
--> The review editor must display one review.
Load a model without dependency
The goal of this model is to test if a review model can be loaded even if it has no dependency to the working model

1. Open this model.
2. Load a review model named MyReview.
--> The review editor must display one review.
Load a file
The goal of this model is to test if a review model can be loaded

1. Open this model
2. Click on the comment on the samm package in the review editor
3. Choose the review file in the project explorer
--> the review editor must display one review
Create a file
The goal of this model is to test if a review model can be created

1. Open this model
2. Click on the comment with a plus.
3. Set the name for a review model
4. Save all.
--> the review editor must display one review and a review model must be created in the project explorer

Close the editor

CloseEditors

CloseEditors


CloseandReopenReviewEditor
CloseAndReopenWorkingModel

Add a review

AddaReview

AddaReview


Add a Review without Model creation
The goal of this test is create a review without a model review.

1. open this model
2. open review editor by using show view.
3. create directly a review

--> a popup appears in order to set the name of review model
--> a review is added and can be seen in the review editor
Add A review in a existing model
The goal of this test is create a review with a model review.

1. open this model
2. open review editor by using show view.
3. create directly a review

--> a popup appears in order to choose the review file
--> a review is added and can be seen in the review editor

Remove a review

Remove

Remove a Review


Remove a Review from a review model
The goal of this test is to remove a review with a model review.

1. open this model
2. load a review model named MyReviews
3. remove a review

--> the review has to be removed

Respond to a review

respond

respond to a review Test


Respond to a review test
The goal of this test is to be able to respond to review.

1. open this model
2. load a review model named MyReviews
3. add areview by selection an existing review
--> the review has to be created under the selected review

Review an element of the working model

Review

Review Element test


Select and review an element in the model
The goal of this model is to test that a review model element can reference an element

1. open this model
2. load a review model named MyReviews
3. select a review form the review editor
4. select the menu hook and choose the class Car of the working model
--> the review must reference the Car

Revision test

Launch revision

testLaunchRevision

testLaunchRevision


Launch revision with an opened model and the review model is not loaded
The goal of this model is to test that a review model is loaded when the revision mode is activated

1. open this model
2. show the review editor with window --> show view--> review editor
3. launch revision model Revision--> Revision Mode

--> The review editor launch a popup in order to choose or create the review model
Launch a revison on a opened model without revision editor
The goal of this model is to test if the revision mode can be launch with the review editor

1. open this model
2. ensure that the revuiew editor is not shown

--> the menu revision is not visible. it is impossible to launch the revision mode
Launch the revision with an opened model and a review editor loaded
The goal of this model is to test if the revision mode can be launched

1. open this model
2. open the review editor window--> show view--> review editor
3. load a review model named MyReviews
4. launch the revision model Revision--> RevisionModel
--> the revision menu must checked

Register modifications

UseCaseDiagram

UseCaseDiagram


Remove an element from the working model
The goal of this model is to test if it is possible to register removing in the review model

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Remove a class "engine"
5. Save all
--> Review has been added with a ref (uri fragment to diff). The review resource msut contain a "Comparison model" with a Diff element about the deletion.
Add an element in to the working model
The goal of this model is to test if it is possible to register adding the review model

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Create a class "seat" with an association
5. Save all
--> Review has been added with a ref (uri fragment to diff). The review resource msut contain a "Comparison model" with 2 Diff element about the adding.
Change an attribute of an element in the working model
The goal of this model is to test if it is possible to register setting in the review model

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Rename the class "Engine" to "Engines"
5. Save all
--> Review has been added with a ref (uri fragment to diff). The review resource msut contain a "Comparison model" with a Match and Diff element about the setting.

See modification in the model explorer

See

See modifications in model explorer


See removed elements
The goal of this model is to test if it is possible to see remove in the model explorer

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Remove a class "engine"
5. Save all
--> The element engine is colored in red with a strikethrough
See addings
The goal of this model is to test if it is possible to see addings in the model explorer

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Create a class "seat" with an association
5. Save all
--> the element seat and the association is colored in green
See a set of value
The goal of this model is to test if it is possible to see settings in the model explorer

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Rename the class "Engine" to "Engines"
5. Save all
--> The class engine is colored in blue

See modification in diagrams

modificationInDiagramsTest

modificationInDiagramsTest


See removed elements
The goal of this model is to test if it is possible to see remove in the diagram

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Remove a class "engine"
5. Save all
--> The element engine is paint whit a red cross
See addings
The goal of this model is to test if it is possible to see addings in the diagram

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Create a class "seat" with an association
5. Save all
--> Borders of the element seat are colored in green
See a set of value
The goal of this model is to test if it is possible to see settings in the diagram

1. Open this model
2. Show review editor
3. Launch the revision mode
4. Rename the class "Engine" to "Engines"
5. Save all
--> The border of the class engine is colored in blue

Stop revision

Strop

Strop revision test


Stop revision test
The goal of this model is to test if the revision mode can be stopped

1. open this model
2. open the review editor window--> show view--> review editor
3. load a review model named MyReviews
4. launch the revision model Revision--> RevisionModel
5. stop the revision mode Revision--> RevisionModel
the menu must be unchecked

Requirements Coverage

RequirementsCoverageTable
IdSatisfy byVerify by
Req_010
Add or change information about the current author for the versionning,
Add, update or remove a review on the current model
Remove an element from the working model,
Change an attribute of an element in the working model,
Add an element in to the working model
Req_011
Add a review about the working model
Select and review an element in the model
Req_020
Add, update or remove a review on the current model,
Add a review about the working model,
Respond to a review,
Add or change information about the current author for the versionning,
Close WorkingModel or close review editor
Load a model without stereotypes,
Load a model without dependency,
Load a file,
Create a file,
CloseAndReopenWorkingModel,
CloseandReopenReviewEditor,
Add A review in a existing model,
Add a Review without Model creation,
Remove a Review from a review model,
Respond to a review test,
Select and review an element in the model
Req_030
Launch Revision mode,
Stop RevisionMode,
Accept or refuse modifications,
Register all modifications with Versioning information
Launch a revison on a opened model without revision editor,
Launch revision with an opened model and the review model is not loaded,
Launch the revision with an opened model and a review editor loaded ,
Add an element in to the working model,
Change an attribute of an element in the working model,
Remove an element from the working model,
See a set of value,
See addings,
See removed elements,
See removed elements,
See addings,
See a set of value,
Stop revision test
Req_021
Create, load or save a review model
Load a file,
Create a file
Req_040
Register all modifications with Versioning information,
Accept or refuse modifications
Remove an element from the working model,
Add an element in to the working model,
Change an attribute of an element in the working model
Unsatisfied requirements (0 out of 6) : 
Unverified requirements (0 out of 6) :