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 |
Editor name (first/last name) |
Company |
|
Initial |
Sébastien Gérard |
CEA LIST |
SG |
Authors name (first/last name) |
Company |
|
Initial |
Sébastien Gérard |
CEA LIST |
SG |
Version |
Date |
Reasons |
1.0 |
2010-05-07 |
Initial contribution. |
|
|
|
|
|
|
|
|
|
|
|
|
Authors 2
Revision chart and history log 3
List of abbreviations 4
Table of contents 5
List of figures 6
List of tables 7
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.
Create a new plug-in for Papyrus
Name your new plug-in applying the formating rule: org.eclipse.papyrus.<YourPluginName>
Then click on the button Finish. Then the following user interface is displayed:
Set the following properties and then click on the button Finish.
Version: 0.7.0.qualifier (The value of this parameter is to set according to the Papyrus version. At the time of the wirting of this documenbt, Papyrus was in version 0.7.0.)
Name: %pluginName
Provided: %providerName
Execution Environment: J2SE-1.5
Add a new file named plugin.properties under the plug-in project
|
|
You then should get then the following result:
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.
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.
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.
Then select svn as shown below...
…
and next select the Papyrus svn repository.
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.
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.
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.
N/A.
2009 The
Papyrus Consortium