On 11/20/11 12:02 PM, Aliaksandr Autayeu wrote:
By the way, the example on the page should be changed to have "catch" on
the same line with the closing bracket;)

from this:

} catch(NumberFormatException e) {

to this:

} catch(NumberFormatException e) {

It's easy to test this - import the OpenNLP-Eclipse-Formatter.xml settings
from the site into Eclipse, copy-paste the example, format, see:)

In our code base the catch is usually on the next line, we should change the
eclipse formatter to do that.
Also, existing code base does not conform to this standard:)  And, although
I would add bracket forcing for "for" and "if" and others similar
statements to the current code formatting standard (as a safety measure I
explained earlier) before reformatting anything, the best example of even
the current code format would be a formatted code base itself. And yes, a
check-in hook to be sure it remains so:)

I am actually not to fond of reformatting the entire existing code base, since
that makes things difficult to diff and changes often don't even improve
the readability.

For example when lines are reformatted which are not long enough.
Just give it a try in a class like BeamSearch.

We should add the one with the brackets in if and for statements.

Jörn




Reply via email to