use of com.intellij.psi.impl.source.resolve.reference.impl.providers.FilePathReferenceProvider in project intellij-plugins by JetBrains.
the class IncludeFileResolvingConverterImpl method createReferences.
@NotNull
public PsiReference[] createReferences(@NotNull final GenericDomValue genericDomValue, @NotNull final PsiElement element, @NotNull final ConvertContext context) {
final String s = genericDomValue.getStringValue();
if (s == null) {
return PsiReference.EMPTY_ARRAY;
}
final StrutsModel model = ConverterUtil.getStrutsModel(context);
if (model == null) {
return PsiReference.EMPTY_ARRAY;
}
final int offset = ElementManipulators.getOffsetInElement(element);
return new FilePathReferenceProvider() {
protected boolean isPsiElementAccepted(final PsiElement element) {
return super.isPsiElementAccepted(element) && (!(element instanceof PsiFile) || isFileAccepted(model, (PsiFile) element));
}
}.getReferencesByElement(element, s, offset, true);
}
Aggregations