IDEA-136406 Complete current statement doesn't insert a method body for default metho...
[idea/community.git] / java / java-impl / src / com / intellij / codeInsight / editorActions / smartEnter / AfterSemicolonEnterProcessor.java
index 9d43379ce92092b1f8dd36f5c1dd2a240113f3b6..35a3df7a3fccda09e5b0d4b4b0068f512d4b4dd8 100644 (file)
@@ -39,9 +39,7 @@ public class AfterSemicolonEnterProcessor implements EnterProcessor {
         psiElement instanceof PsiAssertStatement ||
         psiElement instanceof PsiField ||
         psiElement instanceof PsiImportStatementBase ||
-        psiElement instanceof PsiMethod && (((PsiMethod) psiElement).getContainingClass().isInterface() ||
-                                            ((PsiMethod) psiElement).hasModifierProperty(PsiModifier.ABSTRACT) ||
-                                            ((PsiMethod) psiElement).hasModifierProperty(PsiModifier.NATIVE))) {
+        psiElement instanceof PsiMethod && !MissingMethodBodyFixer.shouldHaveBody((PsiMethod)psiElement)) {
       int errorOffset = getErrorElementOffset(psiElement);
       int elementEndOffset = psiElement.getTextRange().getEndOffset();
       if (psiElement instanceof PsiEnumConstant) {