private static void logSchemeChangeIfNeeded(@NotNull EditorColorsScheme scheme) {
    if (!LOG.isDebugEnabled()) return;
    EditorColorsManager colorsManager = ApplicationManager.getApplication().getServiceIfCreated(EditorColorsManager.class);
    if (colorsManager == null) return;

    EditorColorsScheme globalScheme = colorsManager.getGlobalScheme();
    boolean isGlobal = (scheme == globalScheme);
    boolean isBounded = (scheme instanceof MyColorSchemeDelegate);

    while (!isGlobal && !isBounded && scheme instanceof DelegateColorScheme) {
      scheme = ((DelegateColorScheme)scheme).getDelegate();
      if (scheme == globalScheme) isGlobal = true;
      if (scheme instanceof MyColorSchemeDelegate) {
        isBounded = true;
      }
    }

    if (isGlobal && !isBounded) {
      LOG.debug("Will set the unbounded global scheme to editor (presentationMode=%b)"
                  .formatted(UISettings.getInstance().getPresentationMode()));
      LOG.debug(ExceptionUtil.currentStackTrace());
    }
  }
private static void logSchemeChangeIfNeeded(@NotNull EditorColorsScheme scheme)