Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "MoDisco/How to contribute"
(→String Externalize) |
|||
Line 1: | Line 1: | ||
− | The [http://www.eclipse.org/ | + | 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 9: | Line 9: | ||
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. | 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/ | + | 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&component=MoDisco-Contribution). Then you can attach your file(s). |
Your contribution will be reviewed and integrated. | Your contribution will be reviewed and integrated. | ||
Line 17: | Line 17: | ||
==What to do before contributing== | ==What to do 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. http://wiki.eclipse.org/The_about.html) | ||
− | * Provide your | + | * Provide your code with the header described below |
* Check unused plug-in dependences | * Check unused plug-in dependences | ||
− | * Check that | + | * Check that there exists one branding plug-in per feature |
− | * Externalize | + | * 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. | + | $ find org.eclipse.mdt.modisco* -name build.properties \! -exec grep -sq about.html {} \; -type f -print |
===Header Syntax=== | ===Header Syntax=== | ||
Line 48: | Line 48: | ||
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 | + | * the plug-in name must end with "(Incubation)" |
− | * the plug-in version must | + | * the plug-in version must end with ".qualifier" |
− | In the MANIFEST.MF the | + | In the MANIFEST.MF the strings must be externalized (use "PDE Tools > Externalize Strings...") |
===String Externalize=== | ===String Externalize=== | ||
− | Select the project, then | + | 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 : | For instance, rather than : | ||
Line 75: | Line 75: | ||
conditionResult.getClass().getSimpleName() })); | conditionResult.getClass().getSimpleName() })); | ||
− | Moreover, Eclipse recognizes Bundles Messages and displays the string content when mouse pointer | + | 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 : | + | 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 | + | Guidelines for MoDisco components are available [http://wiki.eclipse.org/MoDisco/Version_Numbering here] |
===build.properties=== | ===build.properties=== | ||
− | + | The following files and folders should never be in "src.includes" (see bug 286808): | |
* .classpath | * .classpath | ||
Line 101: | Line 101: | ||
==Get the source of MoDisco project== | ==Get the source of MoDisco project== | ||
− | [http://wiki.eclipse.org/MoDisco/SVN | + | [http://wiki.eclipse.org/MoDisco/SVN SVN Howto] |
[[Category:MoDisco]] | [[Category:MoDisco]] |
Revision as of 10:43, 19 May 2010
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
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&component=MoDisco-Contribution). Then you can attach your file(s).
Your contribution will be reviewed and integrated.
If you need more details, please use the MoDisco newsgroup.
What to do before contributing
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 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
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>) - initial implementation * ******************************************************************************* * * $Id$ */
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...")
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"
Version numbering
Guidelines for MoDisco components are available here
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.