boolean (@NotNull Project project, @NotNull VirtualFile place) { final boolean inTestSourceContent = ProjectRootManager.getInstance(project).getFileIndex().isInTestSourceContent(place); final Module module = ModuleUtilCore.findModuleForFile(place, project); final VirtualFile targetVirtualFile = myTargetDirectory.getVirtualFile(); if (module != null && !GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module, inTestSourceContent).contains(targetVirtualFile)) { return false; } return true; }