Code style guide lines
richard.bair at oracle.com
Thu Jul 25 11:10:14 PDT 2013
I started a guide on our wiki a while ago: https://wiki.openjdk.java.net/display/OpenJFX/Policies+and+Processes
But I only started it I never actually finished it or even asked anybody else what they thought of it :-).
In general we follow the standard sun guidelines. We use spaces, not tabs. 4 spaces per indent, 8 for line continuation (usually). Comments should be the standard /* */ or //.
We did go non-standard in our use of @Override by putting it on the same line as the method, although it is not consistent. I always do my for loops like:
for (int i=0; i<10; i++)
(Notice the lack of spaces around = and <). This drives Kevin nuts who likes to have spaces around the = and <.
Probably the best way to go is, as you find things that are suspicious or look wrong, lets bring it up and add it to the wiki and grow the wiki to have all the standards (rather than build up a list ahead of time). The Java code conventions should be seen as the rule book, unless we've explicitly modified it and documented it.
On Jul 25, 2013, at 10:39 AM, Tom Schindl <tom.schindl at bestsolution.at> wrote:
> I'm once more doing a clean up pass to get out of the way warnings in
> the control codebase - RT-31907.
> Do you guys follow any coding guide lines? Wouldn't it be good if the
> JavaFX codebase would follow
More information about the openjfx-dev