Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

...

  • See IntelliJ IDEA 13: Importing Code Formatter Settings from Eclipse for instructions on how to use build-tools/src/main/resource/eclipse-xml-settings.epf.
  • The following settings needs manual setup, as these aren't imported from Eclipse:
    • Code styles -> General: Right margin (columns) needs to set to 121 to avoid wrapping 120 length lines 
    • Java
      • Tabs and indents:
        • Continuation indent should be 8.
      • Javadoc: 
        • Do not wrap on line javadoc comment needs to be enabled
        • Preserve line feeds
      • Import statement
        • Order must be manually defined, see specification above
    • Xml
      • Tabs and Indents: Set continuation indent to 2
      • Other: Disable Align attributes.

Headers

We add the following header to all our Java-files. This is done by using the maven-license-plugin. All headers can be updated by running the license:update-file-header

...

Code Block
public JobSupervisor(Provider<JobDAO> jobDaoProvider, Provider<Long> jobTimeoutProvider) {

The Provider<X> interface provides a get() method returning X.  This allows for lazy initialization and/or providing an unknown number of X'es.

Further reading:

...