public static void deleteFacet(final Facet facet) {
    WriteAction.runAndWait(() -> {
      if (!isRegistered(facet)) {
        return;
      }

      ModifiableFacetModel model = FacetManager.getInstance(facet.getModule()).createModifiableModel();
      model.removeFacet(facet);
      model.commit();
    });
  }
public static void deleteFacet(final Facet facet)