@Override
  protected void doOKAction() {
    apply(myOptionsList.getSelectedValue());
    Collection<SeverityBasedTextAttributes> infoTypes = new HashSet<>(getApplicableSeverities());
    final ListModel listModel = myOptionsList.getModel();
    final List<HighlightSeverity> order = new ArrayList<>();
    for (int i = listModel.getSize() - 1; i >= 0; i--) {
      SeverityBasedTextAttributes info = (SeverityBasedTextAttributes)listModel.getElementAt(i);
      order.add(info.getSeverity());
      if (!SeverityRegistrar.isDefaultSeverity(info.getSeverity())) {
        infoTypes.remove(info);
        final Color stripeColor = info.getAttributes().getErrorStripeColor();
        final boolean exists = mySeverityRegistrar.getSeverity(info.getSeverity().getName()) != null;
        if (exists) {
          info.getType().getAttributesKey().getDefaultAttributes().setErrorStripeColor(stripeColor);
        } else {
          HighlightInfoType.HighlightInfoTypeImpl type = info.getType();
          TextAttributesKey key = type.getAttributesKey();
          final TextAttributes defaultAttributes = key.getDefaultAttributes().clone();
          defaultAttributes.setErrorStripeColor(stripeColor);
          key = TextAttributesKey.createTextAttributesKey(key.getExternalName(), defaultAttributes);
          type = new HighlightInfoType.HighlightInfoTypeImpl(type.getSeverity(null), key);
          info = new SeverityBasedTextAttributes(info.getAttributes(), type);
        }

        mySeverityRegistrar.registerSeverity(info, stripeColor != null ? stripeColor : LightColors.YELLOW);
      }
    }
    for (SeverityBasedTextAttributes info : infoTypes) {
      mySeverityRegistrar.unregisterSeverity(info.getSeverity());
    }
    mySeverityRegistrar.setOrder(order);
    super.doOKAction();
  }
@Override
  protected void doOKAction()