mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unimplement interface: find ref correctly (IDEA-84554)
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ public class UnimplementInterfaceAction implements IntentionAction {
|
||||
public void invoke(@NotNull final Project project, final Editor editor, final PsiFile file) throws IncorrectOperationException {
|
||||
if (!CodeInsightUtilBase.preparePsiElementForWrite(file)) return;
|
||||
|
||||
final PsiReference psiReference = file.findReferenceAt(editor.getCaretModel().getOffset());
|
||||
final PsiReference psiReference = TargetElementUtilBase.findReference(editor);
|
||||
if (psiReference == null) return;
|
||||
|
||||
final PsiReferenceList referenceList = PsiTreeUtil.getParentOfType(psiReference.getElement(), PsiReferenceList.class);
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Unimplement Interface" "true"
|
||||
class A {
|
||||
public String toString() {
|
||||
return super.toString();
|
||||
}
|
||||
|
||||
public void foo(String ty){}
|
||||
}
|
||||
|
||||
interface II {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Unimplement Interface" "true"
|
||||
class A implements II<caret> {
|
||||
public String toString() {
|
||||
return super.toString();
|
||||
}
|
||||
|
||||
public void foo(String ty){}
|
||||
}
|
||||
|
||||
interface II {
|
||||
}
|
||||
Reference in New Issue
Block a user