mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed IDEA-175161 Javadoc formatter joins lines incorrectly
Never merge a leading asterisk to the previous line.
This commit is contained in:
@@ -1193,6 +1193,9 @@ public class JavaSpacePropertyProcessor extends JavaElementVisitor {
|
||||
else if (myRole1 == ChildRole.OPERATION_SIGN) {
|
||||
createSpaceInCode(mySettings.SPACE_AROUND_UNARY_OPERATOR);
|
||||
}
|
||||
else if (myType2 == JavaDocTokenType.DOC_COMMENT_LEADING_ASTERISKS) {
|
||||
createSpaceProperty(false, true, 0);
|
||||
}
|
||||
else if ((myType1 == JavaDocTokenType.DOC_TAG_VALUE_TOKEN || myType1 == JavaDocElementType.DOC_TAG_VALUE_ELEMENT) &&
|
||||
(myType2 == JavaDocTokenType.DOC_TAG_VALUE_TOKEN || myType2 == JavaDocElementType.DOC_TAG_VALUE_ELEMENT)) {
|
||||
createSpaceInCode(true);
|
||||
|
||||
+5
-7
@@ -1185,14 +1185,13 @@ interface Test {
|
||||
}
|
||||
|
||||
|
||||
fun _testIdea175161() {
|
||||
fun testIdea175161() {
|
||||
getSettings().RIGHT_MARGIN = 160;
|
||||
getSettings().WRAP_COMMENTS = true;
|
||||
getSettings().KEEP_LINE_BREAKS = false;
|
||||
|
||||
doTextTest(
|
||||
"""
|
||||
package com.company;
|
||||
"""package com.company;
|
||||
|
||||
public class Test {
|
||||
|
||||
@@ -1206,14 +1205,13 @@ public class Test {
|
||||
}
|
||||
""",
|
||||
|
||||
"""
|
||||
package com.company;
|
||||
"""package com.company;
|
||||
|
||||
public class Test {
|
||||
|
||||
/**
|
||||
* Shortcut method for EntryDto items. This method will fetch the id from {@code item} and pass it to {@link #test2(Object, Object, Object, Object, Object)}.
|
||||
* Make sure the dto item returns a non-null id.
|
||||
* Shortcut method for EntryDto items. This method will fetch the id from {@code item} and pass it to {@link #test2(Object, Object, Object, Object,
|
||||
* Object)}. Make sure the dto item returns a non-null id.
|
||||
*/
|
||||
public void test() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user