Skip to content

Commit

Permalink
Remove some 2020.1 compat code
Browse files Browse the repository at this point in the history
  • Loading branch information
nthykier committed May 4, 2024
1 parent d293c33 commit 8964555
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
value. This means that the value will still be rendered in its proper syntax coloring rather than in the "folded"
coloring. (Closes: #159)

### Changed

- Internal/Chore: Replace some compat code now that we no longer support IDEA 2020.1.

## 0.0.23 - 2024-04-06

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,8 @@ public boolean isCollapsedByDefault(@NotNull ASTNode node) {

private static void processComments(PsiElement root, List<FoldingDescriptor> descriptors) {
List<PsiComment> comments = new ArrayList<>();
// Use (root, PsiComment.class, ...) when 201 compat can be dropped.
PsiTreeUtil.processElements(root, e -> {
if (e instanceof PsiComment) {
comments.add((PsiComment)e);
}
PsiTreeUtil.processElements(root, PsiComment.class, e -> {
comments.add(e);
return true;
});
PsiComment currentStart = null;
Expand Down

0 comments on commit 8964555

Please sign in to comment.