private void onSelectionChanged(final Component component) {
    if (component != null && component.isShowing() && isAutoScrollMode()) {
      myAutoScrollAlarm.cancelAllRequests();
      myAutoScrollAlarm.addRequest(
        () -> {
          if (component.isShowing()) { //for tests
            if (!needToCheckFocus() || UIUtil.hasFocus(component)) {
              scrollToSource(component);
            }
          }
        },
        Registry.intValue("ide.autoscroll.to.source.delay", 100)
      );
    }
  }
private void onSelectionChanged(final Component component)