Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Papyrus/Papyrus Developer Guide/Model your development"

(Model Tests)
(How to use MDE to develop Papyrus)
Line 1: Line 1:
 +
 +
__TOC__
  
 
__TOC__
 
__TOC__
 
= How to use MDE to develop Papyrus =
 
= How to use MDE to develop Papyrus =
==<span id="_DDKLgPWrEeWL87HLnAAa-A">Table of Contents</span>==
+
==<span id="_-FfqwPXCEeWzTLgJvBjJCA">Table of Contents</span>==
==<span id="_DDKLgvWrEeWL87HLnAAa-A">Requirements</span>==
+
==<span id="_-FgR0fXCEeWzTLgJvBjJCA">Requirements</span>==
<span id="_DDKLhPWrEeWL87HLnAAa-A">- REQ_001 (id=REQ_001):  
+
<span id="_-Fhf8PXCEeWzTLgJvBjJCA">- REQ_001 (id=REQ_001):  
 
  The tool must help to model papyrus development</span><br>
 
  The tool must help to model papyrus development</span><br>
<span id="_DDKLhvWrEeWL87HLnAAa-A">- REQ_0011 (id=REQ_0011):  
+
<span id="_-FiHAfXCEeWzTLgJvBjJCA">- REQ_0011 (id=REQ_0011):  
 
  The tool must help to model requirements.
 
  The tool must help to model requirements.
 
</span><br>
 
</span><br>
<span id="_DDKLiPWrEeWL87HLnAAa-A">- REQ_0012 (id=REQ_0012):  
+
<span id="_-FiuEfXCEeWzTLgJvBjJCA">- REQ_0012 (id=REQ_0012):  
 
  The tool must help to make the design</span><br>
 
  The tool must help to make the design</span><br>
<span id="_DDKLivWrEeWL87HLnAAa-A">- REQ_0013 (id=REQ_0013):  
+
<span id="_-FjVIfXCEeWzTLgJvBjJCA">- REQ_0013 (id=REQ_0013):  
 
  The tool must help to model test</span><br>
 
  The tool must help to model test</span><br>
<span id="_DDKLjPWrEeWL87HLnAAa-A">- REQ_0014 (id=REQ_0014):  
+
<span id="_-Fj8MfXCEeWzTLgJvBjJCA">- REQ_0014 (id=REQ_0014):  
 
  The model of development must contain traceability</span><br>
 
  The model of development must contain traceability</span><br>
<span id="_DDKLjvWrEeWL87HLnAAa-A">- REQ_0015 (id=REQ_0015):  
+
<span id="_-FlKUPXCEeWzTLgJvBjJCA">- REQ_0015 (id=REQ_0015):  
 
  The tool must help to model use cases.
 
  The tool must help to model use cases.
 
</span><br>
 
</span><br>
<span id="_DDKLkPWrEeWL87HLnAAa-A">- REQ_002 (id=REQ_002):  
+
<span id="_-FlxYPXCEeWzTLgJvBjJCA">- REQ_002 (id=REQ_002):  
 
  From the model, it must be able to generate documentation</span><br>
 
  From the model, it must be able to generate documentation</span><br>
<span id="_DDKLkvWrEeWL87HLnAAa-A">- REQ_0021 (id=REQ_0021):  
+
<span id="_-FmYcPXCEeWzTLgJvBjJCA">- REQ_0021 (id=REQ_0021):  
 
  From the model, it must be able to generate HTML documentation</span><br>
 
  From the model, it must be able to generate HTML documentation</span><br>
<span id="_DDKLlPWrEeWL87HLnAAa-A">- REQ_0022 (id=REQ_0022):  
+
<span id="_-Fm_gfXCEeWzTLgJvBjJCA">- REQ_0022 (id=REQ_0022):  
  From the model, it must be able to generate MEDIAWIKI documentation</span><br>
+
  From the model, it must be able to generate WKIMEDIA documentation</span><br>
==<span id="_DDT8gfWrEeWL87HLnAAa-A">Use Cases</span>==
+
==<span id="_-FnmkfXCEeWzTLgJvBjJCA">Use Cases</span>==
 
<br>
 
<br>
[[Image:UseCases.png]]
+
[[Image:UseCases.png|UseCases]]
 
<br>''UseCases''<br>
 
<br>''UseCases''<br>
 
<br>
 
<br>
<span id="_DFGFMfWrEeWL87HLnAAa-A">In order to model your development and generate your documentation.
+
<span id="_-HVd0fXCEeWzTLgJvBjJCA">In order to model your development and generate your documentation.
 
You must install a version of SysML and the plugin org.eclipse.papyrus.uml.developer.mde that can been found in the git org.eclipse.papyrus\plugins\developer
 
You must install a version of SysML and the plugin org.eclipse.papyrus.uml.developer.mde that can been found in the git org.eclipse.papyrus\plugins\developer
 
</span><br>
 
</span><br>
===<span id="_DFGFM_WrEeWL87HLnAAa-A">PapyrusMDE</span>===
+
===<span id="_-HWE4fXCEeWzTLgJvBjJCA">PapyrusMDE</span>===
====<span id="_DFGFNfWrEeWL87HLnAAa-A">Model Requirements</span>====
+
====<span id="_-HWr8fXCEeWzTLgJvBjJCA">Model Requirements</span>====
<span id="_DFGFN_WrEeWL87HLnAAa-A">  - traces to [[#_DDKLhvWrEeWL87HLnAAa-A|REQ_0011]]</span><br>
+
======<span id="_-HWr8fXCEeWzTLgJvBjJCA">Model Requirements</span>======
<span id="_DFGFOfWrEeWL87HLnAAa-A">The Designer has to create a use case inside the "requirements" model.
+
<span id="_-HX6EPXCEeWzTLgJvBjJCA">  - traces to [[#_-FiHAfXCEeWzTLgJvBjJCA|REQ_0011]]</span><br>
 +
<span id="_-HX6EvXCEeWzTLgJvBjJCA">The Designer has to create a use case inside the "requirements" model.
 
The requirement may be functional or non functional.
 
The requirement may be functional or non functional.
 
Requirements has to be refined or decompose until it can be tested.
 
Requirements has to be refined or decompose until it can be tested.
 
  </span><br>
 
  </span><br>
<span id="_DFGFPfWrEeWL87HLnAAa-A">In order to create requirement, the Designer can use the module "Papyrus Requirement" that help to create requirements</span><br>
+
=====<span id="_-HYhIfXCEeWzTLgJvBjJCA">How to</span>=====
 +
<span id="_-HZIMfXCEeWzTLgJvBjJCA">In order to create requirement, the Designer can use the module "Papyrus Requirement" that help to create requirements</span><br>
 
<br>
 
<br>
[[Image:createRequirements.png]]
+
[[Image:createRequirements.png|Create a requirement]]
 
<br>''Create a requirement''<br>
 
<br>''Create a requirement''<br>
 
<br>
 
<br>
====<span id="_DFGFQfWrEeWL87HLnAAa-A">Model Use Cases</span>====
+
====<span id="_-HaWUfXCEeWzTLgJvBjJCA">Model Use Cases</span>====
<span id="_DFGFQ_WrEeWL87HLnAAa-A">  - traces to [[#_DDKLjvWrEeWL87HLnAAa-A|REQ_0015]], [[#_DDKLjPWrEeWL87HLnAAa-A|REQ_0014]]</span><br>
+
======<span id="_-HaWUfXCEeWzTLgJvBjJCA">Model Use Cases</span>======
<span id="_DFGFRfWrEeWL87HLnAAa-A">The "Designer" has to develop Use cases  that are refinement of the functional requirements.
+
<span id="_-HbkcPXCEeWzTLgJvBjJCA">  - traces to [[#_-FlKUPXCEeWzTLgJvBjJCA|REQ_0015]], [[#_-Fj8MfXCEeWzTLgJvBjJCA|REQ_0014]]</span><br>
 +
<span id="_-HbkcvXCEeWzTLgJvBjJCA">The "Designer" has to develop Use cases  that are refinement of the functional requirements.
 
In each use case, a comment has to be added in order to explain the use case.
 
In each use case, a comment has to be added in order to explain the use case.
 
In each use case,  the designer has to add a set of comment stereotyped "userDoc" in order to write the how to.
 
In each use case,  the designer has to add a set of comment stereotyped "userDoc" in order to write the how to.
 
Each Use case must have a link "satisfy" with the  refined requirement </span><br>
 
Each Use case must have a link "satisfy" with the  refined requirement </span><br>
<span id="_DFGFSfWrEeWL87HLnAAa-A">In order to create a use case, the designer has to create a use case in the component inside the UseCase model.</span><br>
+
=====<span id="_-HcLgfXCEeWzTLgJvBjJCA">How to</span>=====
 +
<span id="_-HcykfXCEeWzTLgJvBjJCA">In order to create a use case, the designer has to create a use case in the component inside the UseCase model.</span><br>
 
<br>
 
<br>
 
[[Image:usecaseCreation.png|Create a Use Case]]
 
[[Image:usecaseCreation.png|Create a Use Case]]
 
<br>''Create a Use Case''<br>
 
<br>''Create a Use Case''<br>
 
<br>
 
<br>
<span id="_DFPPI_WrEeWL87HLnAAa-A">In each Use case, the designer has to add a nested comment in order to explain the goal of the use case, (it can be also an activity diagram or sequence diagram)</span><br>
+
<span id="_-HeAsfXCEeWzTLgJvBjJCA">In each Use case, the designer has to add a nested comment in order to explain the goal of the use case, (it can be also an activity diagram or sequence diagram)</span><br>
 
<br>
 
<br>
 
[[Image:createCommentOnUseCase.png|Create a comment]]
 
[[Image:createCommentOnUseCase.png|Create a comment]]
 
<br>''Create a comment''<br>
 
<br>''Create a comment''<br>
 
<br>
 
<br>
<span id="_DFPPJ_WrEeWL87HLnAAa-A">The designer has also to explain how  a user can execute this function. This is the "how to" section, the purpose is to explain step by step how the user can do in order to run the  functionality.  
+
<span id="_-HfO0fXCEeWzTLgJvBjJCA">The designer has also to explain how  a user can execute this function. This is the "how to" section, the purpose is to explain step by step how the user can do in order to run the  functionality.  
 
To do that, create a comment stereotyped "UserDoc" write you text inside or associate a screenshot of your execution by adding a hyperlink on this comment.</span><br>
 
To do that, create a comment stereotyped "UserDoc" write you text inside or associate a screenshot of your execution by adding a hyperlink on this comment.</span><br>
 
<br>
 
<br>
Line 70: Line 76:
 
<br>''Reference an image by using hyperlinks''<br>
 
<br>''Reference an image by using hyperlinks''<br>
 
<br>
 
<br>
 
+
====<span id="_-HhEAfXCEeWzTLgJvBjJCA">Model the design</span>====
====<span id="_DFPPLfWrEeWL87HLnAAa-A">Model the design</span>====
+
======<span id="_-HhEAfXCEeWzTLgJvBjJCA">Model the design</span>======
<span id="_DFPPL_WrEeWL87HLnAAa-A">  - traces to [[#_DDKLiPWrEeWL87HLnAAa-A|REQ_0012]], [[#_DDKLjPWrEeWL87HLnAAa-A|REQ_0014]]</span><br>
+
<span id="_-HhrEfXCEeWzTLgJvBjJCA">  - traces to [[#_-FiuEfXCEeWzTLgJvBjJCA|REQ_0012]], [[#_-Fj8MfXCEeWzTLgJvBjJCA|REQ_0014]]</span><br>
<span id="_DFPPMfWrEeWL87HLnAAa-A">The designer must model its development in order to be able to explain its architecture, the behavior, choices of its tool.
+
<span id="_-HiSIfXCEeWzTLgJvBjJCA">The designer must model its development in order to be able to explain its architecture, the behavior, choices of its tool.
 
</span><br>
 
</span><br>
<span id="_DFPPNfWrEeWL87HLnAAa-A">To do that, the designer can design the model or make a retro-engineering of the code. To that papyrus provides in papyrus designer a generator and retro tool for the java  or C++code. </span><br>
+
=====<span id="_-Hi5MfXCEeWzTLgJvBjJCA">How to</span>=====
====<span id="_DFPPN_WrEeWL87HLnAAa-A">Model Tests</span>====
+
<span id="_-HjgQfXCEeWzTLgJvBjJCA">To do that, the designer can design the model or make a retro-engineering of the code. To that papyrus provides in papyrus designer a generator and retro tool for the java  or C++code. </span><br>
<span id="_DFPPOfWrEeWL87HLnAAa-A">  - traces to [[#_DDKLivWrEeWL87HLnAAa-A|REQ_0013]], [[#_DDKLjPWrEeWL87HLnAAa-A|REQ_0014]]</span><br>
+
====<span id="_-HkHUfXCEeWzTLgJvBjJCA">Model Tests</span>====
<span id="_DFPPO_WrEeWL87HLnAAa-A">The Designer must add a least one test case for each use case.
+
======<span id="_-HkHUfXCEeWzTLgJvBjJCA">Model Tests</span>======
 +
<span id="_-HkuYPXCEeWzTLgJvBjJCA">  - traces to [[#_-FjVIfXCEeWzTLgJvBjJCA|REQ_0013]], [[#_-Fj8MfXCEeWzTLgJvBjJCA|REQ_0014]]</span><br>
 +
<span id="_-HlVcfXCEeWzTLgJvBjJCA">The Designer must add a least one test case for each use case.
 
A test case is  a use case stereotyped "UseCaseTest".  The Use case must contain an activity that represents the  java class that represents the code of you test.</span><br>
 
A test case is  a use case stereotyped "UseCaseTest".  The Use case must contain an activity that represents the  java class that represents the code of you test.</span><br>
<span id="_DFPPP_WrEeWL87HLnAAa-A">To do that, go to the "Test" model, create use case and stereotype it "Use case Test". This is the scenario to test a use case.
+
=====<span id="_-Hl8gfXCEeWzTLgJvBjJCA">How to</span>=====
 +
<span id="_-HmjkfXCEeWzTLgJvBjJCA">To do that, go to the "Test" model, create use case and stereotype it "Use case Test". This is the scenario to test a use case.
 
In the use case add a comment and explain the scenario.
 
In the use case add a comment and explain the scenario.
 
In the code you must have a JUnit or a java class that corresponds tho this test. Copy qualified name of your test and add it as an activity.
 
In the code you must have a JUnit or a java class that corresponds tho this test. Copy qualified name of your test and add it as an activity.
Line 88: Line 97:
 
<br>''Use Case Test''<br>
 
<br>''Use Case Test''<br>
 
<br>
 
<br>
 
+
====<span id="_-HnxsPXCEeWzTLgJvBjJCA">Generate the documentation</span>====
====<span id="_DFZAI_WrEeWL87HLnAAa-A">Generate the documentation</span>====
+
======<span id="_-HnxsPXCEeWzTLgJvBjJCA">Generate the documentation</span>======
<span id="_DFZAJfWrEeWL87HLnAAa-A">  - traces to [[#_DDKLkPWrEeWL87HLnAAa-A|REQ_002]], [[#_DDKLkvWrEeWL87HLnAAa-A|REQ_0021]], [[#_DDKLlPWrEeWL87HLnAAa-A|REQ_0022]]</span><br>
+
<span id="_-HoYwPXCEeWzTLgJvBjJCA">  - traces to [[#_-FlxYPXCEeWzTLgJvBjJCA|REQ_002]], [[#_-FmYcPXCEeWzTLgJvBjJCA|REQ_0021]], [[#_-Fm_gfXCEeWzTLgJvBjJCA|REQ_0022]]</span><br>
<span id="_DFZAJ_WrEeWL87HLnAAa-A">From the model, it possible to generate the developer Document.
+
<span id="_-Ho_0fXCEeWzTLgJvBjJCA">From the model, it possible to generate the developer Document.
 
This generation is done in two steps: first the tool generate a document model and from the document model it generates a document.
 
This generation is done in two steps: first the tool generate a document model and from the document model it generates a document.
 
The document model contains only package stereotyped "section" and comment stereotyped "content" or "imageRef".
 
The document model contains only package stereotyped "section" and comment stereotyped "content" or "imageRef".
Line 105: Line 114:
 
The transformation from the model of document to the document is bijective.
 
The transformation from the model of document to the document is bijective.
 
</span><br>
 
</span><br>
<span id="_DFZAK_WrEeWL87HLnAAa-A">In order to generate the code: Ensure that the following profile are applied.</span><br>
+
=====<span id="_-Hpm4fXCEeWzTLgJvBjJCA">How to</span>=====
 +
<span id="_-HqN8PXCEeWzTLgJvBjJCA">In order to generate the code: Ensure that the following profile are applied.</span><br>
 
<br>
 
<br>
 
[[Image:appliedProfiles.png|Applied Profiles]]
 
[[Image:appliedProfiles.png|Applied Profiles]]
 
<br>''Applied Profiles''<br>
 
<br>''Applied Profiles''<br>
 
<br>
 
<br>
<span id="_DFZAL_WrEeWL87HLnAAa-A">Fill properties of stereotype "Project " for the root model.</span><br>
+
<span id="_-Hq1AfXCEeWzTLgJvBjJCA">Fill properties of stereotype "Project " for the root model.</span><br>
 
<br>
 
<br>
 
[[Image:fillModelMetaInfo.png|Project stereotype properties]]
 
[[Image:fillModelMetaInfo.png|Project stereotype properties]]
 
<br>''Project stereotype properties''<br>
 
<br>''Project stereotype properties''<br>
 
<br>
 
<br>
<span id="_DFZAM_WrEeWL87HLnAAa-A">Ensure that the model are in directory doc, all images are in the directory doc/imgDOC </span><br>
+
<span id="_-HsDIfXCEeWzTLgJvBjJCA">Ensure that the model are in directory doc, all images are in the directory doc/imgDOC </span><br>
 
<br>
 
<br>
 
[[Image:PluginStrucuture.png|PluginStructure.png]]
 
[[Image:PluginStrucuture.png|PluginStructure.png]]
 
<br>''PluginStructure.png''<br>
 
<br>''PluginStructure.png''<br>
 
<br>
 
<br>
<span id="_DFZAN_WrEeWL87HLnAAa-A">Select the root model in the model explorer and click right to generate html or media wiki</span><br>
+
<span id="_-HtRQfXCEeWzTLgJvBjJCA">Select the root model in the model explorer and click right to generate html or media wiki</span><br>
 
<br>
 
<br>
 
[[Image:generateHTML.png|HTML generation]]
 
[[Image:generateHTML.png|HTML generation]]
 
<br>''HTML generation''<br>
 
<br>''HTML generation''<br>
 
<br>
 
<br>
<span id="_DFZAO_WrEeWL87HLnAAa-A">Open the html document, use a css file, called default css, and you can obtain the following document.
+
<span id="_-HufYfXCEeWzTLgJvBjJCA">Open the html document, use a css file, called default css, and you can obtain the following document.
  
 
Note that this doc has been obtained by using the tool on itself. You can notice that a new model element with the stereotype Document is also generated. You can remove it. I let it in order to demonstrate that is possible to make all in model.  </span><br>
 
Note that this doc has been obtained by using the tool on itself. You can notice that a new model element with the stereotype Document is also generated. You can remove it. I let it in order to demonstrate that is possible to make all in model.  </span><br>
Line 132: Line 142:
 
<br>''Generated HTML page''<br>
 
<br>''Generated HTML page''<br>
 
<br>
 
<br>
 +
==<span id="_-HvtgfXCEeWzTLgJvBjJCA">Design</span>==
 +
===<span id="_-HwUkfXCEeWzTLgJvBjJCA">Package org.eclipse.papyrus.uml.developer.mde</span>===
 +
====<span id="_-Hw7ofXCEeWzTLgJvBjJCA">Class Activator</span>====
 +
======<span id="_-Hw7ofXCEeWzTLgJvBjJCA">Class Activator</span>======
 +
<span id="_-HxisfXCEeWzTLgJvBjJCA">  - specializes [[#_-vApM_W_EeWzTLgJvBjJCA|AbstractUIPlugin]]</span><br>
 +
<span id="_-HyJwfXCEeWzTLgJvBjJCA">The activator class controls the plug-in life cycle
 +
</span><br>
 +
====<span id="_-Hyw0fXCEeWzTLgJvBjJCA">Interface I_DeveloperIDMStereotype</span>====
 +
======<span id="_-Hyw0fXCEeWzTLgJvBjJCA">Interface I_DeveloperIDMStereotype</span>======
 +
<span id="_-HzX4fXCEeWzTLgJvBjJCA">constant included in the MDE process profile
 +
 +
</span><br>
 +
====<span id="_-Hz-8fXCEeWzTLgJvBjJCA">Interface I_DocumentStereotype</span>====
 +
======<span id="_-Hz-8fXCEeWzTLgJvBjJCA">Interface I_DocumentStereotype</span>======
 +
<span id="_-H0mAfXCEeWzTLgJvBjJCA">list of constant contained in the document profile
 +
 +
</span><br>
 +
====<span id="_-H1NEfXCEeWzTLgJvBjJCA">Package command</span>====
 +
======<span id="_-H1NEfXCEeWzTLgJvBjJCA">Package command</span>======
 +
<br>
 +
[[Image:Command_ClassDiagram.png|Command ClassDiagram]]
 +
<br>''Command ClassDiagram''<br>
 +
<br>
 +
=====<span id="_-MUEcfXCEeWzTLgJvBjJCA">Class CreateDocumentModelCommand</span>=====
 +
<span id="_-MUrgfXCEeWzTLgJvBjJCA">  - specializes [[#_-2i0lfW_EeWzTLgJvBjJCA|RecordingCommand]]</span><br>
 +
<span id="_-MVSkfXCEeWzTLgJvBjJCA"> this command transform a model to document model
 +
 +
</span><br>
 +
====<span id="_-MV5ofXCEeWzTLgJvBjJCA">Package handler</span>====
 +
======<span id="_-MV5ofXCEeWzTLgJvBjJCA">Package handler</span>======
 +
<br>
 +
[[Image:Handler_ClassDiagram.png|Handler ClassDiagram]]
 +
<br>''Handler ClassDiagram''<br>
 +
<br>
 +
=====<span id="_-N0gUfXCEeWzTLgJvBjJCA">Class GetHTMLTextHandler</span>=====
 +
<span id="_-N1HYfXCEeWzTLgJvBjJCA">  - specializes [[#_-N2VgfXCEeWzTLgJvBjJCA|IDMAbstractHandler]]</span><br>
 +
<span id="_-N1ucfXCEeWzTLgJvBjJCA">This class is used to create and html developper doc file.
 +
</span><br>
 +
=====<span id="_-N2VgfXCEeWzTLgJvBjJCA">Class IDMAbstractHandler</span>=====
 +
<span id="_-N28kfXCEeWzTLgJvBjJCA">  - specializes [[#_-44W4fW_EeWzTLgJvBjJCA|AbstractHandler]]</span><br>
 +
<span id="_-N3jofXCEeWzTLgJvBjJCA">Abstract handler in order to connect to papyrus
 +
</span><br>
 +
=====<span id="_-N4KsfXCEeWzTLgJvBjJCA">Class GetWikiTextHandler</span>=====
 +
<span id="_-N4xwfXCEeWzTLgJvBjJCA">  - specializes [[#_-N2VgfXCEeWzTLgJvBjJCA|IDMAbstractHandler]]</span><br>
 +
<span id="_-N5Y0fXCEeWzTLgJvBjJCA"> This class is used to create and wiki developper doc file.
 +
 +
</span><br>
 +
====<span id="_-N5_4fXCEeWzTLgJvBjJCA">Package transcription</span>====
 +
======<span id="_-N5_4fXCEeWzTLgJvBjJCA">Package transcription</span>======
 +
<br>
 +
[[Image:Transcription_ClassDiagram.png|Transcription ClassDiagram]]
 +
<br>''Transcription ClassDiagram''<br>
 +
<br>
 +
=====<span id="_-RgGcPXCEeWzTLgJvBjJCA">Class HTMLTranscription</span>=====
 +
<span id="_-RgtgfXCEeWzTLgJvBjJCA">  - realizes [[#_-Rh7ofXCEeWzTLgJvBjJCA|ITranscription]]</span><br>
 +
<span id="_-RhUkfXCEeWzTLgJvBjJCA">This class is a specialization to generate html files.
 +
 +
</span><br>
 +
=====<span id="_-Rh7ofXCEeWzTLgJvBjJCA">Interface ITranscription</span>=====
 +
<span id="_-RiisfXCEeWzTLgJvBjJCA">This class is used to generated very swiftly a document from the document model
 +
 +
</span><br>
 +
=====<span id="_-RjJwfXCEeWzTLgJvBjJCA">Class TranscriptionEngine</span>=====
 +
<span id="_-Rjw0fXCEeWzTLgJvBjJCA"> This class is an engine to traduce a document model into files
 +
</span><br>
 +
=====<span id="_-RkX4PXCEeWzTLgJvBjJCA">Class WikiTranscription</span>=====
 +
<span id="_-Rk-8PXCEeWzTLgJvBjJCA">This class is a specialization to generate mediawiki files.
 +
</span><br>

Revision as of 11:33, 29 March 2016


How to use MDE to develop Papyrus

Table of Contents

Requirements

- REQ_001 (id=REQ_001):

The tool must help to model papyrus development

- REQ_0011 (id=REQ_0011):

The tool must help to model requirements.


- REQ_0012 (id=REQ_0012):

The tool must help to make the design

- REQ_0013 (id=REQ_0013):

The tool must help to model test

- REQ_0014 (id=REQ_0014):

The model of development must contain traceability

- REQ_0015 (id=REQ_0015):

The tool must help to model use cases.


- REQ_002 (id=REQ_002):

From the model, it must be able to generate documentation

- REQ_0021 (id=REQ_0021):

From the model, it must be able to generate HTML documentation

- REQ_0022 (id=REQ_0022):

From the model, it must be able to generate WKIMEDIA documentation

Use Cases


UseCases
UseCases

In order to model your development and generate your documentation. You must install a version of SysML and the plugin org.eclipse.papyrus.uml.developer.mde that can been found in the git org.eclipse.papyrus\plugins\developer

PapyrusMDE

Model Requirements

Model Requirements

- traces to REQ_0011
The Designer has to create a use case inside the "requirements" model. The requirement may be functional or non functional. Requirements has to be refined or decompose until it can be tested.


How to

In order to create requirement, the Designer can use the module "Papyrus Requirement" that help to create requirements

Create a requirement
Create a requirement

Model Use Cases

Model Use Cases

- traces to REQ_0015, REQ_0014
The "Designer" has to develop Use cases that are refinement of the functional requirements. In each use case, a comment has to be added in order to explain the use case. In each use case, the designer has to add a set of comment stereotyped "userDoc" in order to write the how to. Each Use case must have a link "satisfy" with the refined requirement

How to

In order to create a use case, the designer has to create a use case in the component inside the UseCase model.

Create a Use Case
Create a Use Case

In each Use case, the designer has to add a nested comment in order to explain the goal of the use case, (it can be also an activity diagram or sequence diagram)

Create a comment
Create a comment

The designer has also to explain how a user can execute this function. This is the "how to" section, the purpose is to explain step by step how the user can do in order to run the functionality. To do that, create a comment stereotyped "UserDoc" write you text inside or associate a screenshot of your execution by adding a hyperlink on this comment.

Add a comment for the user doc
Add a comment for the user doc


Reference an image by using hyperlinks
Reference an image by using hyperlinks

Model the design

Model the design

- traces to REQ_0012, REQ_0014
The designer must model its development in order to be able to explain its architecture, the behavior, choices of its tool.

How to

To do that, the designer can design the model or make a retro-engineering of the code. To that papyrus provides in papyrus designer a generator and retro tool for the java or C++code.

Model Tests

Model Tests

- traces to REQ_0013, REQ_0014
The Designer must add a least one test case for each use case. A test case is a use case stereotyped "UseCaseTest". The Use case must contain an activity that represents the java class that represents the code of you test.

How to

To do that, go to the "Test" model, create use case and stereotype it "Use case Test". This is the scenario to test a use case. In the use case add a comment and explain the scenario. In the code you must have a JUnit or a java class that corresponds tho this test. Copy qualified name of your test and add it as an activity. Then add a verify link from the test the use case to the requirement. Use papyrus requirement in order to simplify creation of links.

Use Case Test
Use Case Test

Generate the documentation

Generate the documentation

- traces to REQ_002, REQ_0021, REQ_0022
From the model, it possible to generate the developer Document. This generation is done in two steps: first the tool generate a document model and from the document model it generates a document. The document model contains only package stereotyped "section" and comment stereotyped "content" or "imageRef".

Transformation to the document model: Each package requirements, UseCases, Design and Test become a section. Each requirement becomes a paragraph. Each Use Case becomes a section with its comments a paragraph of the section. The comment stereotyped user doc becomes a sub-section "How to". Each diagram will be serialized and become an image inside the container section. Each image hyperlink associated to a comment becomes an image after the paragraph.

The transformation from the model of document to the document is bijective.

How to

In order to generate the code: Ensure that the following profile are applied.

Applied Profiles
Applied Profiles

Fill properties of stereotype "Project " for the root model.

Project stereotype properties
Project stereotype properties

Ensure that the model are in directory doc, all images are in the directory doc/imgDOC

PluginStructure.png
PluginStructure.png

Select the root model in the model explorer and click right to generate html or media wiki

HTML generation
HTML generation

Open the html document, use a css file, called default css, and you can obtain the following document.

Note that this doc has been obtained by using the tool on itself. You can notice that a new model element with the stereotype Document is also generated. You can remove it. I let it in order to demonstrate that is possible to make all in model.

Generated HTML page
Generated HTML page

Design

Package org.eclipse.papyrus.uml.developer.mde

Class Activator

Class Activator

- specializes AbstractUIPlugin
The activator class controls the plug-in life cycle


Interface I_DeveloperIDMStereotype

Interface I_DeveloperIDMStereotype

constant included in the MDE process profile


Interface I_DocumentStereotype

Interface I_DocumentStereotype

list of constant contained in the document profile


Package command

Package command


Command ClassDiagram
Command ClassDiagram

Class CreateDocumentModelCommand

- specializes RecordingCommand
this command transform a model to document model


Package handler

Package handler


Handler ClassDiagram
Handler ClassDiagram

Class GetHTMLTextHandler

- specializes IDMAbstractHandler
This class is used to create and html developper doc file.


Class IDMAbstractHandler

- specializes AbstractHandler
Abstract handler in order to connect to papyrus


Class GetWikiTextHandler

- specializes IDMAbstractHandler
This class is used to create and wiki developper doc file.


Package transcription

Package transcription


Transcription ClassDiagram
Transcription ClassDiagram

Class HTMLTranscription

- realizes ITranscription
This class is a specialization to generate html files.


Interface ITranscription

This class is used to generated very swiftly a document from the document model


Class TranscriptionEngine

This class is an engine to traduce a document model into files


Class WikiTranscription

This class is a specialization to generate mediawiki files.


Back to the top