boolean (@Nullable PsiClass psiClass, @Nullable PsiMethod psiMethod) { if (psiClass == null || psiMethod == null) return false; RunnerAndConfigurationSettings currentConfiguration = RunManager.getInstance(psiClass.getProject()).getSelectedConfiguration(); if (currentConfiguration == null) return false; ConfigurationType configurationType = currentConfiguration.getType(); if (!configurationType.getId().equals("GradleRunConfiguration")) return false; for (TestFramework testFramework : TestFramework.EXTENSION_NAME.getExtensionList()) { if (testFramework.isTestClass(psiClass) && testFramework.isIgnoredMethod(psiMethod)) { return true; } } return false; }