protected @Nullable T calcSelectedClass() {
    if (getTabbedPane().getSelectedIndex() == 0) {
      //noinspection unchecked
      return (T)getGotoByNamePanel().getChosenElement();
    }
    else {
      TreePath path = getTree().getSelectionPath();
      if (path == null) return null;
      DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
      return getSelectedFromTreeUserObject(node);
    }
  }
protected @Nullable T calcSelectedClass()