public void showNodes(final Collection<NodeType> toShow, final Collection<NodeType> toHide) {
    final IProximitySettings proxiSettings = getSettings().getProximitySettings();
    final Set<NodeType> neighbors =
        ProximityRangeCalculator.getNeighbors(
            this,
            toShow,
            proxiSettings.getProximityBrowsingChildren(),
            proxiSettings.getProximityBrowsingParents());

    toHide.removeAll(neighbors);

    for (final NodeType node : sortLayers(toHide)) {
      Preconditions.checkNotNull(
          node, "Error: The list of nodes to hide contained an invalid node");

      ((IViewNode<?>) node.getRawNode()).setVisible(false);
    }

    showNeighbors(toShow);

    notifyVisibilityListeners();
  }
Selects a list of nodes and unselects another list of nodes.

@param toSelect The list of nodes to select.
@param toUnselect The list of nodes to unselect.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/AbstractZyGraph.java