All Questions
Tagged with code-formatting java
197 questions
2
votes
0
answers
34
views
Eclipse indenting of nested HTML tags in Javadoc comments
Suppose I have Javadoc comment with:
/**
* <ul>
* <li>stuff</li>
* <li>stuff</li>
* </ul>
*/
When I run any of the eclipse formatting methods on ...
-4
votes
1
answer
114
views
does spacing between statements, indentation and comments in code affects its time and space complexity? [closed]
I'm trying to understand how code formatting and documentation impacts the performance of a program
Spacing between statements: having more or fewer blank lines between code statements.
Indentation: ...
0
votes
1
answer
83
views
Intellij IDEA Java code formatting: can I force a newline after public and before a method return type?
I would like my java method declarations to look like:
static public
boolean method1(int arg1) {
...
}
where there is a newline after public and before boolean. Is there a way to do that in IntelliJ ...
0
votes
1
answer
86
views
IntelliJ Java formatter align when multiline at asignment
how can I force IntelliJ Java formatter to keep code like this:
boolean betweenKingLeftAndRookEmpty =
board.getSquareAtPosition(59).isEmpty() &&
board....
1
vote
1
answer
594
views
How can I force the 'this' keyword on local fields and methods with the Spotless Java code formatter?
I want to enforce the use of the 'this' keyword using Spotless. For example: getTowerData().recordMap would be this.getTowerData().recordMap.
I'm running Spotless with Gradle with the current ...
0
votes
1
answer
7k
views
Maven build fails with error: An API incompatibility was encountered while executing com.cosium.code:git-code-format-maven-plugin
I have a child project, Project C, which has a dependency on the Maven's Bill of Materials (BOM) parent project, Project P. The parent project, Project P, contains some of the code styles and ...
3
votes
0
answers
958
views
maven build fails due to validate-code-format, is there a way to skip the format validation?
I have a project Project C which has a dependency on the Maven's Bill of Materials (BOM) parent project Project P. The parent project Project P contains some of the code styles.
I do not which to ...
0
votes
0
answers
313
views
Change style of line endings with eclipse code formatter
I am working with windows, using IntelliJ and the eclipse code formatter.
My problem is, that I want to have only Unix style line endings in my project. IntelliJ has the option to use that, but if I ...
0
votes
1
answer
402
views
How to format nested method calls with outer functions on same line?
How do I get Eclipse to format my code like this:
f(g(
jkdfjkfjdsklfjsdkf,
fjdkfjdskfjsdklfjsdfkljsd,
rijekfjdskj,
));
instead of:
f(
g(
jkdfjkfjdsklfjsdkf,
...
4
votes
1
answer
2k
views
Is there a way to make the java eclipse formatter not align the @param descriptions?
I am trying to change the settings of the Eclipse formatter so that it doesn't align the indentation of the param tag descriptions.
This is what I am aiming for:
/**
* Creates a new CTScanData object ...
0
votes
0
answers
550
views
Code style formatting without google-java-format plugin
Please tell me how to use code style formatting in IDEA?
I used the google-java-format plugin and it works very well for me.
An example of my code using the google-java-format plugin:
public Single<...
1
vote
1
answer
907
views
How to ignore some lines in a maven pre-commit code formatter
I have a project that is using git-code-format-maven-plugin from com.cosium.code to format code as a pre-commit hook.
I want to ignore auto formatting in some cases (like a long list of method ...
0
votes
1
answer
336
views
Eclipse Java formatters [closed]
Eclipse (as of now) comes with 3 formatters: "Java Conventions", "Eclipse" and "Eclipse 2.1".
In order to get any other formatter (ex. Google Style), one has to know what ...
1
vote
1
answer
136
views
How to change the javadoc @-clauses order of IntelliJ IDEA code formatter?
IntelliJ IDEA code formatter will auto reformat the order of javadoc @-clauses like this:
/**
*
* @param
* @author
* @since
*/
But I want the following order when reformat:
/**
*
* @author
...
0
votes
1
answer
934
views
Line break before member variable if annotated
Using IntelliJ IDEA, is there a way to configure the Java Code Style to add a line break before annotated member variables (but not non-annotated member variables). Or, perhaps it's possible that all ...