String (PsiDirectory source) { VirtualFile virtualFile = source.getVirtualFile(); final VirtualFile sourceRootForFile = myFileIndex.getSourceRootForFile(virtualFile); if (sourceRootForFile == null) { return ""; } if (virtualFile.equals(sourceRootForFile)) return null; return checkCanCreateInSourceRoot(sourceRootForFile); }