Skip to content

Commit

Permalink
Remove use of deprecated getEndOffset.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddunkin committed Oct 22, 2024
1 parent 00ad180 commit d86f89f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# FacilityIntellij Changelog

## Unreleased
- Remove use of deprecated APIs

## 1.3.3
- Support newer versions of the IntelliJ platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@ class FsdFoldingBuilder : FoldingBuilderEx(), DumbAware {
is FsdRequestFields,
-> {
val startOffset = child.textOffset + 1
val endOffset = child.endOffset - 1
val endOffset = child.textRange.endOffset - 1
createFoldingDescriptor(child.node, startOffset, endOffset, "Fsd Method Parameter Body Group")
}

is FsdDataSpec -> {
val start = PsiTreeUtil.findSiblingForward(child.firstChild, FsdTypes.LEFT_BRACE, null) ?: return@mapNotNull null
val startOffset = start.textOffset + 1
val endOffset = child.endOffset - 1
val endOffset = child.textRange.endOffset - 1
createFoldingDescriptor(child.node, startOffset, endOffset, "Fsd Data Body Group")
}

is FsdEnumSpec -> {
val start = PsiTreeUtil.findChildOfType(child, FsdEnumValueList::class.java) ?: return@mapNotNull null
val startOffset = start.textOffset + 1
val endOffset = child.endOffset - 1
val endOffset = child.textRange.endOffset - 1
createFoldingDescriptor(child.node, startOffset, endOffset, "Fsd Enumerated Value Body Group")
}

is FsdErrorSetSpec -> {
val start = PsiTreeUtil.findChildOfType(child, FsdErrorList::class.java) ?: return@mapNotNull null
val startOffset = start.textOffset + 1
val endOffset = child.endOffset - 1
val endOffset = child.textRange.endOffset - 1
createFoldingDescriptor(child.node, startOffset, endOffset, "Fsd Error Set Body Group")
}

Expand Down

0 comments on commit d86f89f

Please sign in to comment.