Allow removing trivial property accessor body when the accessor can not be fully deleted in redundant getter/setter inspections
This commit is contained in:
@@ -238,7 +238,7 @@ object PositioningStrategies {
|
||||
is KtPropertyAccessor -> {
|
||||
val endOfSignatureElement =
|
||||
element.returnTypeReference
|
||||
?: element.rightParenthesis?.psi
|
||||
?: element.rightParenthesis
|
||||
?: element.namePlaceholder
|
||||
|
||||
return markRange(element, endOfSignatureElement)
|
||||
|
||||
@@ -157,8 +157,13 @@ public class KtPropertyAccessor extends KtDeclarationStub<KotlinPropertyAccessor
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ASTNode getRightParenthesis() {
|
||||
return getNode().findChildByType(KtTokens.RPAR);
|
||||
public PsiElement getRightParenthesis() {
|
||||
return findChildByType(KtTokens.RPAR);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public PsiElement getLeftParenthesis() {
|
||||
return findChildByType(KtTokens.LPAR);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user