RenameScopeType () { String displayName = myRefactoringScope.getDisplayName(); if (displayName.equals(ProjectScope.getProjectFilesScopeName())) { return RenameScopeType.Project; } if (displayName.equals(GlobalSearchScopesCore.getProjectTestFilesScopeName())) { return RenameScopeType.Tests; } if (displayName.equals(GlobalSearchScopesCore.getProjectProductionFilesScopeName())) { return RenameScopeType.Production; } if (myRefactoringScope instanceof LocalSearchScope) { return RenameScopeType.CurrentFile; } Module module = ModuleUtilCore.findModuleForPsiElement(myPrimaryElement); if (module != null && myRefactoringScope.equals(module.getModuleScope())) { return RenameScopeType.Module; } if (!PluginInfoDetectorKt.getPluginInfo(myRefactoringScope.getClass()).isSafeToReport()) { return RenameScopeType.ThirdParty; } return RenameScopeType.Unknown; }