Difference between revisions of "MoDisco/How to contribute"

From Eclipsepedia

Jump to: navigation, search
(build.properties)
m (How To contribute)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The [http://www.eclipse.org/gmt/modisco/ MoDisco project] is open to contributors. All external contributions are welcome :
+
The [http://www.eclipse.org/MoDisco/ MoDisco project] is open to contributors. All external contributions are welcome :
 
* new modernization use-cases
 
* new modernization use-cases
 
* extensions of MoDisco components
 
* extensions of MoDisco components
Line 7: Line 7:
 
==How To contribute==
 
==How To contribute==
  
In the comments of your code, you may mention your identity and company by mail, URL, etc. In this way you may get back some advice from interested people.
+
To submit your MoDisco contribution, please open a bugzilla entry in the Modeling/MDT/MoDisco component (you can use the following address: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT.MoDisco&component=Contribution). Then you can attach your project(s)/file(s).
  
To submit your MoDisco contribution, please open a bugzilla entry in the Modeling/GMT/MoDisco component (you can use the following address: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT&component=MoDisco-Contribution ). Then you could attach your file(s).
+
'''In the comment section of the attachments''', you have to:
 +
* '''list all the authors''' of the contribution
 +
* to confirm that :
  
Your contribution will be reviewed and integrated.
+
  (a) I, <first name> <family name>, wrote 100% of the code I've provided.
 +
  (b) I have the right to contribute the code to Eclipse.
 +
  (c) I contribute the content under the EPL.
 +
  (d) This contribution contains no Cryptography features.
 +
 
 +
'''Each other authors has to send the previous confirmation message''' as a comment of the bug.
 +
 
 +
The MoDisco team works hard to maintain a the MoDisco quality. Each contribution, will increase the work of MoDisco team (bug tracking, testing, support to users,...). That’s why we strongly expect within each contribution:
 +
* '''unit tests''' validating the behaviour of the provided feature are strongly expected,
 +
* a '''documentation''' of the contributed features,
 +
* any information useful to maintain the component.
 +
 
 +
Before to be integrated the contribution will be reviewed by one ore more committer and validated by Eclipse IP Team.
  
 
If you need more details, please use the [http://www.eclipse.org/newsportal/thread.php?group=eclipse.modisco MoDisco newsgroup].
 
If you need more details, please use the [http://www.eclipse.org/newsportal/thread.php?group=eclipse.modisco MoDisco newsgroup].
  
==What to do before contributing==
+
==What to check before contributing==
  
If you wish to publish your component(s) in this project, please check following points :
+
If you wish to publish your component(s) in this project, please check the following points :
* Provide an about.html file (Cf. http://wiki.eclipse.org/The_about.html)
+
* Provide an about.html file (Cf. [[The_about.html]], [http://www.eclipse.org/legal/guidetolegaldoc.php Guide To Legal Doc])
* Provide your Code with the header described below
+
* Provide your code with the header described below
 
* Check unused plug-in dependences
 
* Check unused plug-in dependences
* Check that it exists one branding plug-in per feature
+
* Check that there exists one branding plug-in per feature
* Externalize String from code
+
* Externalize strings from code
  
 
The following Bash command can be used to search missing about.html files:
 
The following Bash command can be used to search missing about.html files:
  
   $ find org.eclipse.gmt* -name build.properties \! -exec grep -sq about.html {} \; -type f -print
+
   $ find org.eclipse.mdt.modisco* -name build.properties \! -exec grep -sq about.html {} \; -type f -print
  
===Header Syntax===
+
===Authoring and Intellectual Property ===
 +
 
 +
In the comments of your code, you have to mention your identity and company by mail, URL, etc. In this way you may get back some advice from interested people.
 +
 
 +
====Header Syntax====
  
 
   /**
 
   /**
Line 39: Line 57:
 
   *  
 
   *  
 
   * Contributors:
 
   * Contributors:
   *    ''<contributor>'' (''<company>'') - initial implementation
+
   *    ''<contributor>'' (''<company>'') - Bug <bug id> - <Bug description>
 
   * *******************************************************************************
 
   * *******************************************************************************
 
   *
 
   *
Line 48: Line 66:
 
In the MANIFEST.MF:
 
In the MANIFEST.MF:
 
* the vendor name must be "Eclipse Modeling Project"
 
* the vendor name must be "Eclipse Modeling Project"
* the plug-in name must finished with "(Incubation)"
+
* the plug-in name must end with "(Incubation)"
* the plug-in version must finish with ".qualifier"
+
* the plug-in version must end with ".qualifier"
In the MANIFEST.MF the Strings must be externalized (use “PDE Tools > Externalize Strings…”)
+
In the MANIFEST.MF the strings must be externalized (use "PDE Tools > Externalize Strings...")
  
 
===String Externalize===
 
===String Externalize===
Cliquer sur le projet, puis sur "Source > Externalize Strings...". On a alors un wizard qui pour chaque String trouvée permet de choisir si elle doit être rendue internationalisable ou pas, et de lui associer une clé.
+
Select the project, then use "Source > Externalize Strings...". A wizard shows strings to internationalize.
  
Par contre, il faut faire attention à ne pas utiliser de concaténations dans les messages, car chaque langue peut avoir un ordre différent.
+
Take care of not using concatenations in messages, since each language might have a different order.
Par exemple, au lieu de:
+
For instance, rather than :  
  
 
         MoDiscoBrowserPlugin.logError("Condition query " + queryName + " in query set "
 
         MoDiscoBrowserPlugin.logError("Condition query " + queryName + " in query set "
Line 62: Line 80:
 
                 + conditionResult.getClass().getSimpleName() + ".");
 
                 + conditionResult.getClass().getSimpleName() + ".");
  
On aura à la place:
+
We will prefer to have:
  
dans messages.properties:
+
in messages.properties :
  
 
         CustomizationEngine_conditionQueryWrongReturnType=Condition query {0} in query set {1} : expected boolean return type, got {2}.
 
         CustomizationEngine_conditionQueryWrongReturnType=Condition query {0} in query set {1} : expected boolean return type, got {2}.
  
Et dans le code:
+
in source :
  
 
         MoDiscoBrowserPlugin.logError(NLS.bind(
 
         MoDiscoBrowserPlugin.logError(NLS.bind(
Line 75: Line 93:
 
                         conditionResult.getClass().getSimpleName() }));
 
                         conditionResult.getClass().getSimpleName() }));
  
En plus Eclipse reconnait les Message Bundles et affiche le contenu de la chaine quand on passe le curseur sur une clé dans le code.
+
Moreover, Eclipse recognizes Bundles Messages and displays the string content when the mouse pointer hovers on a key in the source. And by doing "Source > Find Broken Internationalized String", we may find the undefined or unused keys.
Et en faisant "Source > Find Broken Internationalized String", on peut retrouver les clés non définies ou non utilisées.
+
 
+
Il faut aussi utiliser le wizard "PDE Tools > Externalize Strings...".
+
 
+
Il faudrait que tout le monde active la verification des chaines des caratères dans les préférences d'Eclipse : Windows > Preference > Java > Compiler > Erros/Warnings > "Non-externalized strings (missing/unused $NON-NLS$ tag"
+
 
+
  
 +
You may activate the strings verification in Eclipse preferences : Window > Preferences > Java > Compiler > Errors/Warnings > "Non-externalized strings (missing/unused $NON-NLS$ tag"
  
 
===Version numbering===
 
===Version numbering===
  
Guidelines of MoDisco components are available [http://wiki.eclipse.org/MoDisco/Version_Numbering here]
+
See the guidelines for [[MoDisco/Version_Numbering|version numbering]] of MoDisco components.
  
 
===build.properties===
 
===build.properties===
  
Following files and folders should never been in “src.includes” (see bug 286808):
+
The following files and folders should never be in "src.includes" (see bug 286808):
  
 
* .classpath
 
* .classpath
Line 106: Line 119:
  
 
==Get the source of MoDisco project==
 
==Get the source of MoDisco project==
[http://wiki.eclipse.org/MoDisco/SVN Svn Howto]
+
[[MoDisco/SVN|SVN Howto]]
  
 
[[Category:MoDisco]]
 
[[Category:MoDisco]]

Latest revision as of 12:30, 22 July 2011

The MoDisco project is open to contributors. All external contributions are welcome :

  • new modernization use-cases
  • extensions of MoDisco components
  • metamodels of legacy technologies
  • discoverers and model transformations

Contents

[edit] How To contribute

To submit your MoDisco contribution, please open a bugzilla entry in the Modeling/MDT/MoDisco component (you can use the following address: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT.MoDisco&component=Contribution). Then you can attach your project(s)/file(s).

In the comment section of the attachments, you have to:

  • list all the authors of the contribution
  • to confirm that :
 (a) I, <first name> <family name>, wrote 100% of the code I've provided.
 (b) I have the right to contribute the code to Eclipse.
 (c) I contribute the content under the EPL.
 (d) This contribution contains no Cryptography features.

Each other authors has to send the previous confirmation message as a comment of the bug.

The MoDisco team works hard to maintain a the MoDisco quality. Each contribution, will increase the work of MoDisco team (bug tracking, testing, support to users,...). That’s why we strongly expect within each contribution:

  • unit tests validating the behaviour of the provided feature are strongly expected,
  • a documentation of the contributed features,
  • any information useful to maintain the component.

Before to be integrated the contribution will be reviewed by one ore more committer and validated by Eclipse IP Team.

If you need more details, please use the MoDisco newsgroup.

[edit] What to check before contributing

If you wish to publish your component(s) in this project, please check the following points :

  • Provide an about.html file (Cf. The_about.html, Guide To Legal Doc)
  • Provide your code with the header described below
  • Check unused plug-in dependences
  • Check that there exists one branding plug-in per feature
  • Externalize strings from code

The following Bash command can be used to search missing about.html files:

 $ find org.eclipse.mdt.modisco* -name build.properties \! -exec grep -sq about.html {} \; -type f -print

[edit] Authoring and Intellectual Property

In the comments of your code, you have to mention your identity and company by mail, URL, etc. In this way you may get back some advice from interested people.

[edit] Header Syntax

 /**
 * *******************************************************************************
 * Copyright (c) <year> <company>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     <contributor> (<company>) - Bug <bug id> - <Bug description>
 * *******************************************************************************
 *
 * $Id$
 */

[edit] Manifest file

In the MANIFEST.MF:

  • the vendor name must be "Eclipse Modeling Project"
  • the plug-in name must end with "(Incubation)"
  • the plug-in version must end with ".qualifier"

In the MANIFEST.MF the strings must be externalized (use "PDE Tools > Externalize Strings...")

[edit] String Externalize

Select the project, then use "Source > Externalize Strings...". A wizard shows strings to internationalize.

Take care of not using concatenations in messages, since each language might have a different order. For instance, rather than :

       MoDiscoBrowserPlugin.logError("Condition query " + queryName + " in query set "
               + querySetName + " : expected boolean return type, got "
               + conditionResult.getClass().getSimpleName() + ".");

We will prefer to have:

in messages.properties :

       CustomizationEngine_conditionQueryWrongReturnType=Condition query {0} in query set {1} : expected boolean return type, got {2}.

in source :

       MoDiscoBrowserPlugin.logError(NLS.bind(
               Messages.CustomizationEngine_conditionQueryWrongReturnType,
               new Object[] { queryName, querySetName,
                       conditionResult.getClass().getSimpleName() }));

Moreover, Eclipse recognizes Bundles Messages and displays the string content when the mouse pointer hovers on a key in the source. And by doing "Source > Find Broken Internationalized String", we may find the undefined or unused keys.

You may activate the strings verification in Eclipse preferences : Window > Preferences > Java > Compiler > Errors/Warnings > "Non-externalized strings (missing/unused $NON-NLS$ tag"

[edit] Version numbering

See the guidelines for version numbering of MoDisco components.

[edit] build.properties

The following files and folders should never be in "src.includes" (see bug 286808):

  • .classpath
  • .project
  • .settings/
  • META-INF
  • OSGI-INF/
  • bin/
  • build.properties
  • plugin.xml
  • plugin.properties
  • src

When a file is in bin.includes, it should never be present in src.includes, with the exception of about.html.

[edit] Get the source of MoDisco project

SVN Howto