Eclipse Code Formatter Profile within IntelliJ: Javadoc formatting

496 Views Asked by At

as all the other collegues are working with eclipse for an project I have imported the Eclipse Formatter profile xml file and imported it within IntelliJ so far everything seems to be ok, but there is a difference with the javadoc formatting and I could not find the place where to adjust this value.

Eclipse: 12 spaces indent for parameter description

 * @param first
 *            The first parameter. For an optimum result, this should be an
 *            odd number between 0 and 100.

IntelliJ: 10 spaces indent

 * @param i
 *         short named parameter description

The simplest solution would be to turn off formatting javadoc within IntelliJ but maybe there is a better one?

I have tried spotless maven plugin with the xml profile and the import order but it was also messing around with the javadoc.

Since java is quite grown-up programming language and is widely used I am wondering how this can be. Google code format is not an option so far. But an code formatter which you can customize to that level would be great. Any suggestions?

Thanks and Best Regards Matt

1

There are 1 best solutions below

1
On

The indent size for parameter descriptions is defined by the "Continuation indent" value (Settings/Preferences -> Editor -> Code Style -> Java -> Tabs and Indents)

That will affect more than just parameter descriptions, though, so I'm not sure if that would work for you.

Another option for you might be configuring Adapter for Eclipse Code Formatter

One more thing I can think of is EditorConfig, but it will require some configuring on both Eclipse and IDEA ends.