Hello,
I have checked in my Eclipse Java code formatting settings as an XML file that can be found here.
svn://svn.freehep.org/hps/java/sandbox/HPSJavaCodeConventions.xml
You can load this into your local Eclipse by going to
Preferences > Java > Code Style > Formatter
and then clicking the Import button and opening the XML file.
The main settings of this formatter are
-4 space indents
-no tabs (spaces only)
-120 character maximum line width
-120 character maximum comment line width
-braces on same line (K&R / Java style)
There are many other minor settings in there for spacing, etc.
At some point I am planning on formatting all of the HPS Java code using a single formatter, so before that happens we should discuss the particulars.
Please load these settings into your Eclipse and experiment with them. We can work on coming up with formatting settings that everyone agrees upon with this as a start.
Also, for my own code I have also been using an Eclipse "Save Action" which automatically cleans up a Java file everytime I save it.
Those settings are not exportable, but I have put a screen grab of my configuration here if you want to test it.
svn://svn.freehep.org/hps/java/sandbox/EclipseSaveActions.png
For instance, this will organize imports, add the "final" keyword to method parameters, sort class members, etc. everytime I save.
I have found it quite handy for keeping my source code cleaned up.
Thanks.
--Jeremy
########################################################################
Use REPLY-ALL to reply to list
To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
|