mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
[Java. Refactorings] Show rename popup only when method is located outside the test class
IDEA-351758 GitOrigin-RevId: f4004e304639fa4f58d6bc4a67e5c137172482fc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ba39cce039
commit
a526e56691
@@ -11,7 +11,8 @@ import com.intellij.usageView.UsageInfo
|
||||
class JavaAutomaticTestMethodRenamerFactory : AutomaticTestMethodRenamerFactory() {
|
||||
override fun isApplicable(element: PsiElement): Boolean {
|
||||
if (element !is PsiMethod) return false
|
||||
return !TestFrameworks.getInstance().isTestMethod(element)
|
||||
val clazz = element.containingClass ?: return false
|
||||
return !TestFrameworks.getInstance().isTestClass(clazz)
|
||||
}
|
||||
|
||||
override fun isEnabled(): Boolean = JavaRefactoringSettings.getInstance().isRenameTestMethods
|
||||
|
||||
Reference in New Issue
Block a user