Coding Rules
When committing code to the TRex codebase, please respect the following coding rules:
- SUN's Code Conventions for the Java Programming Language
- Furthermore, you may get some inspiration from the Eclipse Platform's Standards, Conventions and Guidelines. (While most of them relate to org.eclipse.* plug-ins, some of them are also reasonable for TRex, e.g. prefixing Interfaces names with 'I'.)
- Format your code using Eclipse's default code formatting options (they may violate SUN's Code Conventions. In this case, Eclipse's default code formatting have precedence).
- You may use Eclipes's Source -> Clean up functionality with default settings. (Even though the default settings do not clean up very much.)
- Do not hesitate to use Java 5 language features.
- Minimise compiler warnings.
- For ANTLR-generated code and the ANTLR plug-in itself, we have disabled warnings; but for code which is under our control, we do not want to see any warnings.
- Use Javadoc comments. (We behaved not very well in the past concerning this...)
- Add JUnit tests for the non-UI components: either actual unit tests or more system level like tests as demonstrated by the formatter and refactoring tests available in the automated test component. (Currently, no real unit level JUnit tests exist...)
- Use SVN commit logs which describe the semantics of your change (Do not describe changes on the syntactical level: the syntax of your changes can be obtained by using the Compare functionality). Refer to JIRA bug IDs (as described on the JIRA for Developers page) where appropriate.
- In case you like to change a commit log (e.g. because it refers to a wrong JIRA bug ID), please contact the maintainers: they have privileges to change commit logs.
- Refer to the Developer's HOWTOs for non-standard changes like adding new plug-ins/changing the plug-in structure or making changes to the trex.product file.
