On Aug 30, 2012, at 18:22, Christian Hammers <c...@lathspell.de> wrote:
> Am Thu, 30 Aug 2012 18:05:50 -0400 > schrieb Gary Gregory <garydgreg...@gmail.com>: > >> On Aug 30, 2012, at 17:58, Christian Hammers <c...@lathspell.de> wrote: >> >>> Am Thu, 30 Aug 2012 16:21:43 -0400 >>> schrieb Gary Gregory <garydgreg...@gmail.com>: >>> >>>> On Thu, Aug 30, 2012 at 2:57 PM, Thomas Neidhart >>>> <thomas.neidh...@gmail.com>wrote: >>>> >>>>> Hi, >>>>> >>>>> there are quite some differences on the javadoc style in the >>>>> source files, e.g. the number of spaces before a @param >>>>> description, whether there is an empty line between @param, >>>>> @return and @throws. >>>>> >>>> >>>> I like the default Eclipse formatting style: >>>> >>>> /** >>>> * ... >>>> * >>>> * @param arg1 >>>> * blah blah blah blah >>>> * @throws SomeException >>>> * blah blah >>>> */ >>> >>> I usually stick with the default Netbeans formatting style which >>> puts them on the same line. So does the example in the official >>> Java Code Conventions (I only refer to it if it does things my way >>> *g*) Doesn't waste so much precious vertical space either :) >>> >>> Anyway, what I wanted to ask was if there is maybe some kind of >>> pom.xml magic that tells Eclipse, Netbeans, IDEA etc how we want >>> the formatting so that we can all continue pressing ctrl-f for >>> reformat before a commit and be sure that everything looks proper. >>> >> >> There is such magic sadly. The best we can do is a combination of >> convention and use of the checkstyle maven plugin. > > Hm, actually there seems to be some possibilities: > For eclipse you can add <workspaceCodeStylesURL> to the eclipse plugin: > http://maven.apache.org/plugins/maven-eclipse-plugin/examples/load-code-styles.html > And for netbeans you can ship a nb-configuration.xml which is explicitly > intended to be added to the version control system and be shared. > Example: > http://java.net/projects/electric/sources/svn/content/trunk/electric/electric-3d/nb-configuration.xml?rev=13769 > > (In the meantime, please be generous if I submit a patch that contains > a newline to much because auto-formatting added it :-)) One setting: line length 120. Gary > > bye, > > -christian- > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org