public boolean contextSelect(D nodeData){
  if (selectedNodes.isEmpty()) {
    insertAndSelectNode(nodeData,0,true);
    return true;
  }
  if (!hasSameParent(selectedNodes.get(0),nodeData) || selectedNodes.size() == 1) {
    return selectSingleNode(nodeData);
  }
  if (!selectedNodes.contains(nodeData)) {
    int insertionIndex=getInsertionIndex(nodeData);
    insertAndSelectNode(nodeData,insertionIndex,true);
    return true;
  }
  return false;
}

public boolean contextSelect ( D nodeData ) { if ( selectedNodes . isEmpty ( ) ) { insertAndSelectNode ( nodeData , 0 , true ) ; return true ; } if ( ! hasSameParent ( selectedNodes . get ( 0 ) , nodeData ) || selectedNodes . size ( ) == 1 ) { return selectSingleNode ( nodeData ) ; } if ( ! selectedNodes . contains ( nodeData ) ) { int insertionIndex = getInsertionIndex ( nodeData ) ; insertAndSelectNode ( nodeData , insertionIndex , true ) ; return true ; } return false ; }
adds the node to the selection if it isn ' t already there in response to a context selection .
