mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
mad testing: don't expect web references to be completed
This commit is contained in:
@@ -85,7 +85,7 @@ class JavaCompletionPolicy extends CompletionPolicy {
|
||||
return false; // IDEA-178629
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return super.shouldSuggestReferenceText(ref, target);
|
||||
}
|
||||
|
||||
private static boolean isAdoptedOrphanPsiAfterClassEnd(PsiElement element) {
|
||||
|
||||
+3
-2
@@ -17,6 +17,7 @@ package com.intellij.testFramework.propertyBased;
|
||||
|
||||
import com.intellij.codeInsight.TargetElementUtil;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.paths.WebReference;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
@@ -67,7 +68,7 @@ public class CompletionPolicy {
|
||||
|
||||
if (ref instanceof PsiMultiReference) {
|
||||
for (PsiReference ref1 : ((PsiMultiReference)ref).getReferences()) {
|
||||
if (target == ref1.resolve() && !shouldSuggestReferenceText(ref1, target)) return null;
|
||||
if (target.getClass().isInstance(ref1.resolve()) && !shouldSuggestReferenceText(ref1, target)) return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,6 +114,6 @@ public class CompletionPolicy {
|
||||
}
|
||||
|
||||
protected boolean shouldSuggestReferenceText(@NotNull PsiReference ref, @NotNull PsiElement target) {
|
||||
return true;
|
||||
return !(ref instanceof WebReference);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user