void (boolean content) { String linkedPath = myContentDir.getPath() + "/linked"; IoTestUtil.createSymLink(myNonContentDir.getPath(), linkedPath, true); VirtualFile linkedVFile = VfsUtil.findFileByIoFile(new File(linkedPath, myNonContentFile.getName()), true); assertEquals(linkedVFile, ProjectRootUtil.findSymlinkedFileInContent(getProject(), myNonContentVFile)); if(content) { PsiTestUtil.addContentRoot(getModule(), myNonContentVFile.getParent()); } else { PsiTestUtil.addLibrary(getModule(), myNonContentVFile.getParent().getPath()); } assertEquals(myNonContentVFile, ProjectRootUtil.findSymlinkedFileInContent(getProject(), myNonContentVFile)); }