Collection<PsiFileSystemItem> () { final AntDomElement element = myValue.getParentOfType(AntDomElement.class, false); final AntDomProject containingProject = element != null? element.getAntProject() : null; if (containingProject != null) { if (isAbsolutePathReference()) { return toFileSystemItems(ManagingFS.getInstance().getLocalRoots()); } else { VirtualFile root = null; if (element instanceof AntDomAnt) { final PsiFileSystemItem dirValue = ((AntDomAnt)element).getAntFileDir().getValue(); if (dirValue instanceof PsiDirectory) { root = dirValue.getVirtualFile(); } } if (root == null) { final String basedir; if (element instanceof AntDomIncludingDirective) { basedir = containingProject.getContainingFileDir(); } else { basedir = containingProject.getContextAntProject().getProjectBasedirPath(); } if (basedir != null) { root = LocalFileSystem.getInstance().findFileByPath(basedir); } } if (root != null) { return toFileSystemItems(root); } } } return super.computeDefaultContexts(); }