mbien commented on code in PR #7641:
URL: https://github.com/apache/netbeans/pull/7641#discussion_r1705469731
##########
java/java.source.base/test/unit/src/org/netbeans/modules/java/source/save/FormatingTest.java:
##########
@@ -5201,6 +5201,51 @@ public void testJavadoc() throws Exception {
+ "}\n";
reformat(doc, content, golden);
+
+ content ="package hierbas.del.litoral;\n" +
+ "\n" +
Review Comment:
feel free to bump the java version to 17 to unlock text blocks.
replace
https://github.com/apache/netbeans/blob/08339224a1417114ef2838fccbc5fcfeeb992c1e/java/java.source.base/nbproject/project.properties#L21
with `java.release=17`
##########
java/java.source.base/src/org/netbeans/modules/java/source/save/Reformatter.java:
##########
@@ -4788,127 +4788,135 @@ private void reformatComment() {
return;
}
}
- String text = tokens.token().text().toString();
- int offset = tokens.offset();
+ final String text = tokens.token().text().toString();
+ final int offset = tokens.offset();
LinkedList<Pair<Integer, Integer>> marks = new
LinkedList<Pair<Integer, Integer>>();
int maxParamNameLength = 0;
int maxExcNameLength = 0;
int initTextEndOffset = Integer.MAX_VALUE;
+ final int ACTION_TYPE_ADD_BLANK_LINE = 0;
+ final int ACTION_TYPE_ADD_NEW_LINE = 1;
+ final int ACTION_TYPE_ALIGN_PARAMS = 2;
+ final int ACTION_TYPE_ALIGN_RETURN = 3;
+ final int ACTION_TYPE_ALIGN_EXCEPTIONS = 4;
+ final int ACTION_TYPE_NO_FORMAT = 5;
+ final int ACTION_TYPE_FORMAT = 6;
Review Comment:
this looks like a candidate for an `enum`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists