Print

Print


Hi,

It seems to me that both the LCSim and HPS Java code base contain a mix of different code formatting conventions, and this has become a real mess.

This is what I propose for global formatting settings for these projects:

-In Eclipse, use "Java Conventions [built-in]" as the basic template for formatting.

-Set "Tab Policy" under indentation to "Spaces only", "Identation size" to 4, and "Tab size" to 4.

-In Eclipse, under Preferences > General > Editors > Text Editors check the "Insert spaces for tabs" checkbox and set "Displayed tab width" to 4.

-In Eclipse, under Preferences > XML > XML Files > Editor select the "Indent using spaces" checkbox and set Indentation size to 4.

-Do not EVER use tabs in either of these projects.

That should cover the basics.

--

For new Java files, please include the following class documentation style:

/**
 * This is my class.  It does something special.
 * @author John Doe <[log in to unmask]>
 *
 */
class MyClass {
  // etc.
}

--

I do not think it is necessary to include the "@version" tag with the SVN ID as this information is available using the client, e.g. with 'svn status theFileName'.

I'm going to apply these styles to all Java and XML files in both projects at some point.  And if I see major deviations in the future like tabs being used, 2 space indents in XML files, etc. I will re-format them accordingly.

Any questions or comments, then please reply.

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