GlobalSearchScope () { GlobalSearchScope scope = null; ExternalSystemManager<?, ?, ?, ?, ?> manager = ExternalSystemApiUtil.getManager(mySettings.getExternalSystemId()); if (manager != null) { scope = manager.getSearchScope(getProject(), mySettings); } if (scope == null) { VirtualFile file = VfsUtil.findFileByIoFile(new File(mySettings.getExternalProjectPath()), false); if (file != null) { Module module = ProjectFileIndex.getInstance(getProject()).getModuleForFile(file, false); if (module != null) { scope = ExecutionSearchScopes.executionScope(Collections.singleton(module)); } } } return scope; }