Versions Compared

Key

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

...

HTML code should be XHTML compliant. Groovy and Javascript files should follow the same conventions as Java files. For Javascript we suggest to use Aptana in Eclipse and to import /tools/ofbiz.aptana.js.format.xml (from Windows/Preferences/Aptana/Editors/Javascript/Formatting/Import in Eclipse).

We don't want tab characters in text files in SVN, because different editors and tools interpret tabs differently. All indentation should be done purely with spaces.

In accordance with this standard we use 4 space indention rather than tabs, and set the tab size to 8 spaces to make code with tabs easier to pick out. Make sure no code contains tab characters.
For XML/HTML/FTL files we follow the standard XML/HTML/FTL format (TODO: add link to a reference here). XML/HTML/FTL files should use 2 spaces instead of 4, but there are still number of files using 4 space indention. So it's better to keep the indentation used in each file to avoid confusion when committing.

We don't want tab characters in text files in SVN, because different editors and tools interpret tabs differently. All indentation should be done purely with spaces.

To change tabs to spaces in Eclipse, change these preferences in Window -> Preferences->

...

In Eclipse, for Java, you may use Ctrl+I to be sure of correct indentation.

For Javascript in Eclipse we suggest to use Aptana and to import /tools/ofbiz.aptana.js.format.xml (from Windows/Preferences/Aptana/Editors/Javascript/Formatting/Import in Eclipse).

Personaly (Jacques Le Roux), I use Eclipse and format my Java code with this attached file: ofbiz.xml

Entity Definitions

Entity Names

...