@Override
  public @NotNull TextMateSettingsState getState() {
    TextMateSettingsState state = new TextMateSettingsState();
    ArrayList<BundleConfigBean> bundles = new ArrayList<>();
    TextMateUserBundlesSettings settings = TextMateUserBundlesSettings.getInstance();
    if (settings != null) {
      for (Map.Entry<String, TextMatePersistentBundle> entry : settings.getBundles().entrySet()) {
        bundles.add(new BundleConfigBean(entry.getValue().getName(),
                                         entry.getKey(),
                                         entry.getValue().getEnabled()));
      }
    }
    TextMateBuiltinBundlesSettings builtinBundlesSettings = TextMateBuiltinBundlesSettings.getInstance();
    if (builtinBundlesSettings != null) {
      Set<String> turnedOffBundleNames = builtinBundlesSettings.getTurnedOffBundleNames();
      for (TextMateBundleToLoad bundle : TextMateServiceImplKt.discoverBuiltinBundles(builtinBundlesSettings)) {
        bundles.add(new BundleConfigBean(bundle.getName(), bundle.getPath(), !turnedOffBundleNames.contains(bundle.getName())));
      }
    }
    state.setBundles(bundles);
    return state;
  }
@Override
  public @NotNull TextMateSettingsState getState()