On creating/adding a new plug-in in Papyrus Version 1.0


















Papyrus Tutorial:

How to create and add a new plug-in within Papyrus?

































Editor

Sébastien Gérard, CEA LIST

Status

Final version

Version number

1.0

Date of preparation

2010-05-07

Authors

Editor name (first/last name)

Company

E-mail

Initial

Sébastien Gérard

CEA LIST

Sebastien.gerard@cea.fr

SG





Authors name (first/last name)

Company

E-mail

Initial

Sébastien Gérard

CEA LIST

Sebastien.gerard@cea.fr

SG





Revision chart and history log

Version

Date

Reasons

1.0

2010-05-07

Initial contribution.













Table of contents

Authors 2

Revision chart and history log 3

List of abbreviations 4

Table of contents 5

List of figures 6

List of tables 7

1 Introduction 8

2 <<<Main chapters>>> 9

3 Summary and conclusion 10

4 References 11





1Introduction

The purpose of this document is to provide to Papyrus developpers a tutorial explaining how to create and add a new plug-in within Papyrus.

2How to create a new plug-in for Papyrus ?

  1. Create a new plug-in for Papyrus





  1. Name your new plug-in applying the formating rule: org.eclipse.papyrus.<YourPluginName>




  1. Then click on the button Finish. Then the following user interface is displayed:




  1. Set the following properties and then click on the button Finish.

  1. Add a new file named plugin.properties under the plug-in project








You then should get then the following result:






  1. Edit the file and add the following text inside. This file is used for defining the variables used in the plug-in definition. In our case, we have previously introduced both following variables, pluginName and providerName. The value set for this variable may be any kind of string. Then do not forget to save the file and you can also close it.




  1. Configure the manifest of the plug-in. For that purpose, open the file named MANIFEST.MF under the folder named META-INF as shown below. In our case, we check the resource folder and plugin.properties file in order these later may be automatically included in the build of the plug-in. Then do not forget to save the file and you can also close it.




Your plug-in is now created and can be committed to the Papyrus repository. For that purpose please refer to next chpater.

3How to commit a new plug-in within the Papyrus repository?

  1. Now, the final step is to commit your new plug-in on the Papyrus svn. For that purpose, select your plug-in in the package explorer and do following action, Team>Share Project.., as shown below.




  1. Then select svn as shown below...





  1. … and next select the Papyrus svn repository.



  1. Finish and then you get the user interface shwon below. You have to select “Use mutliple projects ...” option in the group named “Project Repository Layout”. The value to set is depending on the location you want to commit your new plug-in. A priori it is on the trunk of Papyrus, so it should start by “/trunk” and then you specify the path of the targeted location. In our example, the new plug-in will be committed under the path “/trunk/plugins/uml”. Then you have also to uncheck the box named “Use Subversion recommend layout ...”, and then you can press the button Finish.




  1. Finally, you will get the following last user interface that ask you to enter a comment denoting the new commit. Pressing the button OK, you will have finished the process and your plug-in should be added to the Papyrus svn repository.




  1. Last step is to check that everything has been done correctly. For that, switch to the svn view and check that your new plug-in has been uploaded correctly and at the right location and close then bug that was attached to that new feature supported by your plug-in.

4References

N/A.

2009 The Papyrus Consortium 13/13