return new PsiReference[0];
}
DoctrineTypes.Manager manager = EntityHelper.getManager(methodMatchParameter.getMethodReference());
if(manager != null) {
return new PsiReference[]{ new EntityReference((StringLiteralExpression) psiElement, manager) };
}
return new PsiReference[]{ new EntityReference((StringLiteralExpression) psiElement) };
}
}
);
psiReferenceRegistrar.registerReferenceProvider(
PlatformPatterns.psiElement(StringLiteralExpression.class),
new PsiReferenceProvider() {
@NotNull
@Override
public PsiReference[] getReferencesByElement(@NotNull PsiElement psiElement, @NotNull ProcessingContext processingContext) {
MethodMatcher.MethodMatchParameter methodMatchParameter = new MethodMatcher.StringParameterMatcher(psiElement, 0)
.withSignature("\\Doctrine\\Common\\Persistence\\ObjectManager", "find")
.match();
if(methodMatchParameter == null) {
return new PsiReference[0];
}
DoctrineTypes.Manager manager = EntityHelper.getManager(methodMatchParameter.getMethodReference());
if(manager != null) {
return new PsiReference[]{ new EntityReference((StringLiteralExpression) psiElement, manager) };
}
return new PsiReference[]{ new EntityReference((StringLiteralExpression) psiElement) };
}
}
);
psiReferenceRegistrar.registerReferenceProvider(