Skip to content
barbeau edited this page Aug 3, 2012 · 5 revisions

Eclipse Configuration

If you are using Eclipse for development, we have a number of files to help you maintain consistent project code styling.

All settings files can be checked out from the GitHub repository:

git://github.com/OneBusAway/onebusaway.git

Specifically:

https://github.com/OneBusAway/onebusaway/tree/master/eclipse

We will also provide direct links to files where applicable.

Code style/formatting

Project -> Properties -> Java Code Style -> Formatter -> Import...

eclipse/code-style/org.onebusaway-format.xml

Or download:

https://raw.github.com/OneBusAway/onebusaway/master/eclipse/code-style/org.onebusaway-format.xml

XML style/formatting

Unfortunately, you have to manually configure XML formatting under Window->Preferences->XML->XML Files->Editor:

  • Line width: 120
  • Indent using spaces
  • Indentation size: 2

XML style/formatting

Import organization

Project -> Properties -> Java Code Style -> Organize Imports -> Import...

eclipse/code-style/org.onebusaway.importorder

Or download:

https://raw.github.com/OneBusAway/onebusaway/master/eclipse/code-style/org.onebusaway.importorder

Class Member Sort Order

Class Member Sort Order