disable Override method intention for constructor

This commit is contained in:
Anna.Kozlova
2018-07-12 11:23:44 +02:00
parent 6acd785187
commit 7f79852971
2 changed files with 7 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ public class ImplementAbstractMethodAction extends BaseIntentionAction {
int offset = editor.getCaretModel().getOffset();
final PsiMethod method = findMethod(file, offset);
if (method == null || !method.isValid()) return false;
if (method == null || !method.isValid() || method.isConstructor()) return false;
setText(getIntentionName(method));
if (!method.getManager().isInProject(method)) return false;

View File

@@ -0,0 +1,6 @@
// "Override method 'A'" "false"
class A {
<caret>A() {}
}
class B extends A {}