int (@NotNull IntentionActionWithTextCaching other) { if (myAction instanceof Comparable) { //noinspection unchecked return ((Comparable)myAction).compareTo(other.getAction()); } if (other.getAction() instanceof Comparable) { //noinspection unchecked return -((Comparable)other.getAction()).compareTo(myAction); } return Comparing.compare(getText(), other.getText()); }