mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable "insert new" fix on invalid code
This commit is contained in:
@@ -47,7 +47,7 @@ public class InsertNewFix implements IntentionAction {
|
||||
|
||||
@Override
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
|
||||
return myMethodCall.isValid() && myMethodCall.getManager().isInProject(myMethodCall);
|
||||
return myMethodCall.isValid() && myMethodCall.getManager().isInProject(myMethodCall) && !(myMethodCall.getNextSibling() instanceof PsiErrorElement);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Insert new" "false"
|
||||
class a {
|
||||
void f() {
|
||||
if (Runtime<caret>Exception() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user