ExpandVariants (@NotNull Url url) { if (myUrl.equals(url)) { return ExpandVariants.EXPAND_AND_EXIT; } if (isAncestor(url, myUrl)) { return ExpandVariants.EXPAND_CONTINUE; } return ExpandVariants.DO_NOTHING; }