GlobalSearchScope () { final TestData data = myConfig.getPersistantData(); final Module module = myConfig.getConfigurationModule().getModule(); if (data.TEST_OBJECT.equals(TestType.PACKAGE.getType())) { SourceScope scope = myConfig.getPersistantData().getScope().getSourceScope(myConfig); if (scope != null) { return scope.getGlobalSearchScope(); } } else if (module != null) { return GlobalSearchScope.moduleWithDependenciesScope(module); } return GlobalSearchScope.projectScope(myConfig.getProject()); }