mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-212623 Folding comments in Java out of FileHeader/Class blocks
GitOrigin-RevId: 8ee4a65241cf9861e37440731c2844dda4787726
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a585246332
commit
257c648365
+1
@@ -400,6 +400,7 @@ public abstract class JavaFoldingBuilderBase extends CustomFoldingBuilder implem
|
||||
}
|
||||
|
||||
addFoldsForFileHeader(descriptors, file, document);
|
||||
addCommentsToFold(descriptors, root, document, processedComments);
|
||||
}
|
||||
|
||||
private static void addFoldsForImports(@NotNull List<? super FoldingDescriptor> list, @NotNull PsiJavaFile file) {
|
||||
|
||||
@@ -1,6 +1,26 @@
|
||||
<fold text='/.../'>/*
|
||||
file header comment
|
||||
*/</fold>
|
||||
|
||||
package test;
|
||||
<fold text='/*...*/'>/*
|
||||
outer class comment
|
||||
*/</fold>
|
||||
|
||||
<fold text='//...'>//outer class
|
||||
//consequent EOL comments</fold>
|
||||
|
||||
import java.util.List;
|
||||
<fold text='/*...*/'>/*
|
||||
outer class comment
|
||||
*/</fold>
|
||||
|
||||
<fold text='//...'>//outer class
|
||||
//consequent EOL comments</fold>
|
||||
|
||||
<fold text='/*...*/'>/*
|
||||
before class comment
|
||||
*/</fold>
|
||||
class Test {
|
||||
<fold text='/*...*/'>/*
|
||||
dangling multiline commnent
|
||||
@@ -41,4 +61,9 @@ class Test {
|
||||
}</fold>
|
||||
}</fold>
|
||||
}</fold>
|
||||
}
|
||||
}
|
||||
<fold text='/*...*/'>/*
|
||||
after class comment
|
||||
*/</fold>
|
||||
<fold text='//...'>// after class
|
||||
//consequent EOL comments</fold>
|
||||
Reference in New Issue
Block a user