PopupStep (final SelectInTarget target, final boolean finalChoice) { if (finalChoice) { PsiDocumentManager.getInstance(mySelectInContext.getProject()).commitAllDocuments(); target.selectIn(mySelectInContext, true); return FINAL_CHOICE; } if (target instanceof CompositeSelectInTarget) { final ArrayList<SelectInTarget> subTargets = new ArrayList<>(((CompositeSelectInTarget)target).getSubTargets(mySelectInContext)); if (subTargets.size() > 0) { subTargets.sort(new SelectInManager.SelectInTargetComparator()); return new SelectInActionsStep(subTargets, mySelectInContext); } } return FINAL_CHOICE; }