code: public HadoopServer getSelectedServer() {
      ITreeSelection selection = (ITreeSelection) viewer.getSelection();
      Object first = selection.getFirstElement();
      if (first instanceof HadoopServer) {
        return (HadoopServer) first;
      }
      return null;
    }
docs: Return the currently selected server (null if there is no selection or
  if the selection is not a server)
  
  @return the currently selected server entry