int (@NotNull IntentionAction other) { if (other instanceof IntentionActionWrapper) { IntentionAction action1 = getDelegate(); IntentionAction action2 = ((IntentionActionWrapper)other).getDelegate(); if (action1 instanceof Comparable && action2 instanceof Comparable) { //noinspection rawtypes,unchecked return ((Comparable)action1).compareTo(action2); } } return getText().compareTo(other.getText()); }