boolean (@Nullable HighlightDisplayKey key, @Nullable PsiElement element) { if (key == null) { return false; } Tools toolState = getToolsOrNull(key.toString(), element == null ? null : element.getProject()); return toolState != null && toolState.isEnabled(element); }