/**
   * Remove a stereotype from the list of stereotypes to display.
   *
   * @param st the stereotype to remove
   */
  @Override
  protected void unapplyStereotype(final Element elt, final Stereotype st) {
    super.unapplyStereotype(elt, st);
    // bugfix: a selected element is not necessary a diagram element (ex: selection in the outline)
    if (diagramElement == null) {
      return;
    }
    try {
      getDomain()
          .runExclusive(
              new Runnable() {

                public void run() {

                  Display.getCurrent()
                      .asyncExec(
                          new Runnable() {

                            public void run() {
                              String presentationKind =
                                  AppliedStereotypeHelper.getAppliedStereotypePresentationKind(
                                      diagramElement);
                              RecordingCommand command =
                                  AppliedStereotypeHelper.getRemoveAppliedStereotypeCommand(
                                      getDomain(),
                                      diagramElement,
                                      st.getQualifiedName(),
                                      presentationKind);

                              getDomain().getCommandStack().execute(command);
                            }
                          });
                }
              });
    } catch (Exception e) {
      e.printStackTrace();
    }
  }