Skip to content
Will Rogers edited this page Mar 22, 2016 · 13 revisions

General

  • Remove any trailing whitespace for all files
  • Files should have Unix-style line endings

Java

  • Use four spaces (no tabs) for indentation
  • Add the @Override annotation when overriding methods or implementing interface methods

XML

  • Use spaces (no tabs) for indentation; number of spaces is not mandated

Eclipse plug-ins

  • Do not commit the .settings folder for a plug-in to Git
  • In the .classpath file, ensure the following entry <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> does not contain a specific Java version
  • In META-INF/MANIFEST.MF, ensure that the correct Java version is selected: Bundle-RequiredExecutionEnvironment: JavaSE-1.8

Useful Eclipse settings

  • Window | Preferences | Maven | Errors/Warnings and downgrade errors to warnings
  • Window | Preferences | General | Editors | Text Editors | Show whitespace characters
  • Window | Preferences | Java | Editor | Save Actions | Configure... | Code Organising
  • remove trailing whitespace

Unit tests

See UnitTests

Clone this wiki locally