@Override
  public @Nullable HighlightSeverity getSeverity(@NotNull RefElement element) {
    if (ApplicationManager.getApplication().isDispatchThread()) {
      return WriteIntentReadAction
        .compute((Computable<HighlightSeverity>)() -> doGetSeverity(element));
    } else {
      return ReadAction
        .nonBlocking(() -> doGetSeverity(element))
        .executeSynchronously();
    }
  }
@Override
  public @Nullable HighlightSeverity getSeverity(@NotNull RefElement element)