@Nullable
  TemplateGroup getSingleContextGroup() {
    int index = getSingleSelectedIndex();
    DefaultMutableTreeNode node = getNode(index);
    if (node != null && node.getUserObject() instanceof TemplateImpl) {
      node = (DefaultMutableTreeNode)node.getParent();
    }
    return node == null ? null : ObjectUtils.tryCast(node.getUserObject(), TemplateGroup.class);
  }
@Nullable
  TemplateGroup getSingleContextGroup()