private <T> T getFor(Object object, @NotNull String key, @NotNull Class<T> type) {
    if (GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance()) return null;
    if (Registry.is("ui.disable.dimension.service.keys")) return null;
    if (UISettings.getInstance().getPresentationMode()) key += PRESENTATION_MODE_MODE_KEY_SUFFIX; // separate key for the presentation mode
    String keyWithScale = withAppendedIdeScale(key);
    boolean tryWithScale = shouldAppendIdeScaleToKey();
    GraphicsConfiguration configuration = getConfiguration(object);
    synchronized (myStateMap) {
      if (tryWithScale) {
        T result = synchronizedGetFor(configuration, keyWithScale, type);
        if (result != null) return result;
      }
      return synchronizedGetFor(configuration, key, type);
    }
  }
private <T> T getFor(Object object, @NotNull String key, @NotNull Class<T> type)