Enabled AddKotlinSignatureAnnotation action available for methods without body.

This commit is contained in:
Evgeny Gerashchenko
2012-08-25 16:31:38 +04:00
parent bb0f0b19b2
commit 96c01b725f
@@ -116,10 +116,12 @@ public class AddKotlinSignatureAnnotation extends BaseIntentionAction {
//Not available in method's body
PsiCodeBlock body = res.getBody();
if (body == null) return null;
TextRange textRange = body.getTextRange();
if (textRange == null || textRange.getStartOffset() <= offset) return null;
if (body != null) {
TextRange bodyRange = body.getTextRange();
if (bodyRange != null && bodyRange.getStartOffset() <= offset) {
return null;
}
}
return res;
}
}