static @NotNull PluginEnabler getInstance() {
    if (!LoadingState.COMPONENTS_LOADED.isOccurred()) {
      return HEADLESS;
    }

    Application application = ApplicationManager.getApplication();
    if (application == null || application.isDisposed()) {
      return HEADLESS;
    }

    return application.getService(PluginEnabler.class);
  }
static @NotNull PluginEnabler getInstance()