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.
PTP/contributing
Contributing to PTP
To make changes to the PTP, whether it be code, docs, JUnits, etc., you will need to send patches to the source stored on eclipse.org. Here is the process for sending patches.
- To fix anything in PTP first you need to create or find an existing bugzilla report for this particular problem/enhancement
- Setup your eclipse SDK and check out source code, see Environment Setup article.
- Fix the source code
- Comment your changes in the code
- If the changes are significant add your name and company in the contributor list in the file header. For new files you must add copyright header: http://wiki.eclipse.org/PTP/policy/developer_guidelines#Copyright
- Follow Developer Guidelines for code formating and java warnings/errors
- Externalize strings (excluding exception arguments, tests and special identifiers)
- Check for API errors (you have to setup API tooling, see Using API Tooling)
- Code with any of the warnings/errors mentioned in the policy, including strings externalization and API errors will not be accepted.
- To minimize the change, do not re-format the source code you edited (except changed lines). Do not fix any warnings in the code you are not changing
- If you really want to do formatting or styling (such as converting to java 1.7) - create another bug for that and attach a patch(it is good to fix warnings but it would clutter the patch, you want to solve one problem at a time).
- To speed up process of applying your changes you should create one or more junit tests as well and include it in your change
- Gerrit is now used by the PTP project for contributions, follow the steps here to submit your changes to Gerrit (replacing CDT with PTP).
- Post a new comment in the bug report containing a link to the Gerrit so that people watching the bug know the a change has been posted for review, for example https://git.eclipse.org/r/#/c/8327/
- Check size of the contribution, if it adds more than 1,000 lines see copyright section below
- Make sure bug report has a clear reproducible scenario, if not add one
- Normally committers are watching new Bugzilla/Gerrit activity and somebody would look at your contribution in a few days
- If it has not received attention in a week or so, some nagging can help. Send email to mailto:ptp-dev@eclipse.org asking committers to look at the contribution. Continue sending e-mails until somebody would give up and look :)
One of the fundamental rules that Eclipse follows is the ability to trace back who contributed what code and that the person who contributed it has ownership of the code, or has permission from their employer to contribute the code (since employers tend to own everything you write). To help keep this IP integrity going, please ensure your contributions are "clean".
- If you copy ANY code or images from somewhere else please clearly state it
- If you copy GPL code we cannot take it
- If you copy EPL code, preserve the original copyright and contributors
- If your changes add more than 1,000 lines, the patch has to go through IP review process, unless it can be applied by the committer from the same company as you are. Nobody wants to do it so please avoid it. Try to fix one bug at a time.
- The 1,000 lines include code, comments and even whitespace.
Signing your Contribution License agreement (CLA)
The CLA is a short document that essentially asks The Three Questions required for each contributions. It is mandatory to electronically sign a CLA before any contributions can be accepted. To sign your CLA:
- Obtain an Eclipse Foundation userid. Anyone who currently uses our Bugzilla or Gerrit systems already has one of those. If they don’t, they need to register.
- Login into the projects portal, select “My Account”, and then the “Contributor License Agreement” tab.
- If you use Gerrit you might have to wait about an hour until CLA is available in Gerrit.