private void replaceConstraint(AnAction oldAction, AnAction newAction) {
    Constraints constraint = myConstraints.get(oldAction);
    if (constraint != null) {
      myConstraints.put(newAction, constraint);
      myConstraints.remove(oldAction);
    }
  }
private void replaceConstraint(AnAction oldAction, AnAction newAction)