Artifact Content
Not logged in

Artifact 059df37955dbfdfa1a059b65d7703ae1ec5626e3:

Wiki page [Coding Style] by jan.nijtmans 2012-07-23 06:34:47.
D 2012-07-23T06:34:47.109
L Coding\sStyle
P 32dc4f4c50fd32f868e0d7a57213d741cce06251
U jan.nijtmans
W 1414
<h2>Coding Style</h2>

<p>By default, the default <b>Eclipse</b> coding style is assumed, but a few small modifications are made. </p>

<p>How can we enforce the system (not the people!) keeping the agreed-upon
coding style in all source files? Simply by using the Eclipse feature that
every "save" automatically does the necessary fixes. This only works if the
Eclipse formatter does exactly what is intended. So, if you think that
one of the rules below make your life unnecessary difficult, please submit
a ticket on it.</p>

<h3>Screen width 132</h3>
<p>A line with of 80 characters is being considered too restrictive, so a line width of 132 characters is chosen. Why 132? Simply because it was the next available line width available in old IBM 3270-compatible monitors and printers</p>
<p>This change make it possible to place parameters values with comments
in javadoc function comment blocks on a single line. With 80 characters on a line, there often is not enough space to do that.</p>

<h3>Don't force line join</h3>
<p>If a developer splits a line for readability, Eclipse should respect that. Eclipse's default for this option is "off" for backwards compatibility with older Eclipse versions which didn't have this option. But without this, there are too many examples that Eclipse would create unnecessary long lines, expecially with a screen width of 132.</p>

Z 1c8783bb2cf2ddcfe6fce3c94d7b77e7