void () { try { Collection<PsiElement> leaves = leafExpressions.get(); if (leaves == null) return; //cancelled if (leaves.isEmpty()) { Messages.showErrorDialog(LangBundle.message("dialog.message.unable.to.find.leaf.expressions.to.group.by"), LangBundle.message("dialog.title.cannot.group")); return; } groupByValues(leaves, root, map); } finally { finish.run(); } }