Icon (@NotNull PsiElement element, int flags) { if (element.getContainingFile() == null) return null; final List<TestFramework> testFrameworks = TestFramework.EXTENSION_NAME.getExtensionList(); for (TestFramework framework : testFrameworks) { if (!isSuitableByLanguage(element, framework)) continue; try { if (framework.isIgnoredMethod(element)) { Icon ignoredTestIcon = AllIcons.RunConfigurations.IgnoredTest; LayeredIcon icon = LayeredIcon.layeredIcon(() -> new Icon[]{ignoredTestIcon, PlatformIcons.PUBLIC_ICON}); icon.setIcon(PlatformIcons.PUBLIC_ICON, 1, ignoredTestIcon.getIconWidth(), 0); return icon; } } catch (AbstractMethodError ignored) {} } for (TestFramework framework : testFrameworks) { if (!isSuitableByLanguage(element, framework)) continue; try { if (framework.isTestMethod(element)) { LayeredIcon mark = LayeredIcon.layeredIcon(new Icon[]{IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Method), AllIcons.RunConfigurations.TestMark, PlatformIcons.PUBLIC_ICON}); mark.setIcon(PlatformIcons.PUBLIC_ICON, 2, IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Method).getIconWidth(), 0); return mark; } } catch (AbstractMethodError ignore) {} } return null; }