PsiReference[] (@NotNull PsiElement element, String value, int startInElement) { final int atSignIndex = value.indexOf('@'); if (atSignIndex >= 0 && (atSignIndex == 0 || StringUtil.trimLeading(value).startsWith("@"))) { value = value.substring(atSignIndex + 1); startInElement += atSignIndex + 1; } final FileReferenceSet set = new FileReferenceSet(value, element, startInElement, null, true) { @Override protected Condition<PsiFileSystemItem> getReferenceCompletionFilter() { return item -> { if (item instanceof PsiDirectory) return true; final VirtualFile virtualFile = item.getVirtualFile(); if (virtualFile == null) return false; return myAcceptedFileTypes.contains(virtualFile.getExtension()); }; } }; if (value.startsWith("/")) { set.addCustomization(FileReferenceSet.DEFAULT_PATH_EVALUATOR_OPTION, FileReferenceSet.ABSOLUTE_TOP_LEVEL); } return set.getAllReferences(); }