GlobalSearchScope () { final TestNGConfiguration configuration = getConfiguration(); final String testObject = configuration.getPersistantData().TEST_OBJECT; if (TestType.CLASS.getType().equals(testObject) || TestType.METHOD.getType().equals(testObject)) { return super.initScope(); } else { final SourceScope sourceScope = configuration.getPersistantData().getScope().getSourceScope(configuration); return sourceScope != null ? sourceScope.getGlobalSearchScope() : GlobalSearchScope.allScope(getProject()); } }