fix: add missing " * " on new line for block comments, flip addCodeComment args (#2145)

This commit is contained in:
Skylot
2024-04-08 21:03:37 +01:00
parent dbadbb01fc
commit 41d6b0018e
2 changed files with 9 additions and 5 deletions
@@ -9,29 +9,33 @@ public enum CommentStyle {
*/
LINE("// ", "// ", ""),
// @formatter:off
/**
* <pre>
* /*
* * comment
* *&#47;
* *&#47;
* </pre>
*/
BLOCK("/*\n ", " ", "\n */"),
// @formatter:on
BLOCK("/*\n * ", " * ", "\n */"),
/**
* <pre>
* /* comment *&#47;
* </pre>
*/
BLOCK_CONDENSED("/* ", " ", " */"),
BLOCK_CONDENSED("/* ", " * ", " */"),
// @formatter:off
/**
* <pre>
* /**
* * comment
* *&#47;
* *&#47;
* </pre>
*/
// @formatter:on
JAVADOC("/**\n * ", " * ", "\n */"),
/**
@@ -30,7 +30,7 @@ public abstract class NotificationAttrNode extends LineAttrNode implements ICode
addAttr(AType.CODE_COMMENTS, new CodeComment(comment, CommentStyle.LINE));
}
public void addCodeComment(CommentStyle style, String comment) {
public void addCodeComment(String comment, CommentStyle style) {
addAttr(AType.CODE_COMMENTS, new CodeComment(comment, style));
}