int (@NotNull UsageGroup otherGroup) { int compareTexts = getPresentableGroupText().compareToIgnoreCase(otherGroup.getPresentableGroupText()); if (compareTexts != 0) return compareTexts; if (otherGroup instanceof FileUsageGroup) { return myFile.getPath().compareTo(((FileUsageGroup)otherGroup).myFile.getPath()); } return 0; }