[LL] don't include kotlin classes in combined java provider
do not resolve annotations when short name doesn't match
This commit is contained in:
+10
@@ -31,6 +31,7 @@ import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Objects;
|
||||
|
||||
import static org.jetbrains.kotlin.load.java.structure.impl.JavaElementCollectionFromPsiArrayUtil.namedAnnotationArguments;
|
||||
|
||||
@@ -95,6 +96,15 @@ public class JavaAnnotationImpl extends JavaElementImpl<PsiAnnotation> implement
|
||||
return externalAnnotationManager.isExternalAnnotation(psi);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isResolvedTo(@NotNull FqName fqName) {
|
||||
PsiJavaCodeReferenceElement referenceElement = getPsi().getNameReferenceElement();
|
||||
if (referenceElement == null || !Objects.equals(referenceElement.getReferenceName(), fqName.shortNameOrSpecial().asString())) {
|
||||
return false;
|
||||
}
|
||||
return getPsi().hasQualifiedName(fqName.asString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFreshlySupportedTypeUseAnnotation() {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user