PTP adheres to the [http://wiki.eclipse.org/Development_Conventions_and_Guidelines Eclipse Foundation development conventions and guidelines]. Please make sure you read through these before committing code (if you're a committer) or submitting code contributions (if not).

+

PTP follows the standard requirements for working on Eclipse projects Please ensure you have read the [[Development Resources | Eclipse Development Resources]] prior to beginning work.

+

+

PTP also adheres to the [[Development_Conventions_and_Guidelines]] Eclipse Foundation development conventions and guidelines]. Please make sure you read through these before committing code (if you're a committer) or submitting code contributions (if not).

The following practices should also be observed:

The following practices should also be observed:

Line 5:

Line 7:

*All source files must start with an [http://www.eclipse.org/legal/copyrightandlicensenotice.php approved license and copyright declaration]

*All source files must start with an [http://www.eclipse.org/legal/copyrightandlicensenotice.php approved license and copyright declaration]

*All plugins must include an [http://www.eclipse.org/legal/epl/about.php about.html file]

*All plugins must include an [http://www.eclipse.org/legal/epl/about.php about.html file]

+

+

== Contributions from non-committers ==

+

+

Contributions from non-committers should be handled by following these guidelines: [[Development Resources/Handling Git Contributions|Handling Git Contributions]]

For convenience and consistency in use, you may want to set the editor to apply the formatting changes automatically on save. See Window > Preferences > Java > Editor > Save Actions. Check "Perform the selected actions on save", check "Format source code", and check "Additional actions"

−

== Adding new Plugin or Feature ==

+

== Adding new Plugin ==

−

1. Add the plugin to the anonymous and committer project sets for HEAD.

+

* Enable API Tooling on the plugin (PDE Tools>API Tools Setup..)

−

2. Add the plugin to a feature so it gets built (in this case it should be org.eclipse.ptp.core-feature)

+

* Add the plugin to the anonymous and committer project sets for HEAD.

−

3. Add the plugin to the map file org.eclipse.releng/maps/ptp.map

+

* Add the plugin to a feature so it gets built (in this case it should be org.eclipse.ptp.core-feature)

−

4. Add a tagone entry in the tag target in org.eclipse.ptp.releng/build.xml

+

* Add the plugin to the map file org.eclipse.releng/maps/ptp.map

−

5. Add a about.html

+

* Add a tagone entry in the tag target in org.eclipse.ptp.releng/build.xml

−

6. Announce on ptp-dev

+

* Add a about.html

+

* Announce on ptp-dev

There is some documentation on the release engineering here: http://wiki.eclipse.org/PTP/release_engineering

There is some documentation on the release engineering here: http://wiki.eclipse.org/PTP/release_engineering

Line 61:

Line 96:

*Always use NULL for pointers, not 0

*Always use NULL for pointers, not 0

*Always test for an explicit value from strcmp

*Always test for an explicit value from strcmp

+

*All functions should be declared static unless explicitly exported with an 'extern' prototype in the header file

+

*Filenames should be all lowercase with words separated by '_'

C source formatting guidelines:

C source formatting guidelines:

Line 71:

Line 108:

*Variable declarations should be followed by a blank line

*Variable declarations should be followed by a blank line

*No spaces before or after '(' and ')' in functions

*No spaces before or after '(' and ')' in functions

−

*Opening brace on same line as last ')' in an if statement expression

+

*Opening brace on same line as last ')' in an 'if', 'for', or 'switch' statement expression

−

*Space separating 'if' and '('

+

*Space separating keyword and '('

*No spaces after '(' or before ')' in if statements

*No spaces after '(' or before ')' in if statements

*No braces around return values

*No braces around return values

Line 81:

Line 118:

*Start each line of a multiline comment with an '*' aligned with the '*' in the '/*'

*Start each line of a multiline comment with an '*' aligned with the '*' in the '/*'

−

Naming conventions for global objects:

+

C naming conventions:

−

+

−

*Capitalize the first letter of each word (e.g.MIBreakpointGetBreakInsertInfo)

+

−

*Do not use '_' or '-'

+

−

*Use descriptive names

+

−

+

−

Naming conventions for local/utility objects:

+

−

*All lowercase

+

*Global function and type identifiers:

−

*Separate words with '_'

+

**Capitalize the first letter of each word (e.g.MIBreakpointGetBreakInsertInfo)

−

*Do not use '-'

+

**Do not use '_' or '-'

+

**Use descriptive names

+

*Local (static) and utility function and type identifiers, and structure field identifiers:

+

**All lowercase

+

**Separate words with '_'

+

**Do not use '-'

+

*Local (static) variables:

+

**Can start with '_'

Revision as of 12:09, 6 December 2012

PTP follows the standard requirements for working on Eclipse projects Please ensure you have read the Eclipse Development Resources prior to beginning work.

PTP also adheres to the Development_Conventions_and_Guidelines Eclipse Foundation development conventions and guidelines]. Please make sure you read through these before committing code (if you're a committer) or submitting code contributions (if not).