boolean (@NotNull PsiFile psiFile) { VirtualFile virtualFile = psiFile.getOriginalFile().getVirtualFile(); do { if (virtualFile == null) return true; if (virtualFile.getName().equals("archetype-resources")) { if (virtualFile.getPath().endsWith("src/main/resources/archetype-resources")) { return false; } } virtualFile = virtualFile.getParent(); } while (true); }