Coding Style

elmer-garduno edited this page Dec 11, 2012 · 6 revisions

Coding convention

We follow Apache UIMA Code Conventions which briefly defines how we should write code (e.g. use 2 spaces for indent); please read them, it's a very short page. They provide preferences for eclipse which allows you to format your code by selecting lines of codes and Ctrl+Shift+F.

Import the preferences on:

Eclipse > Preferences (Mac)
Window > Preferences (Windows)

Click edit and make sure that:

Java > Code Style > Formatter
 Tab policy: spaces only
 Indentation size: 2 
 Tab size: 2

And also that

General > Editors > Text Editors
 Displayed tab width: 2
General > Workspace
 Text file encoding: UTF-8
 New text file delimiter: Unix