void (LinearGraph graph, GraphChanges<Integer> changes) { Set<Integer> nodesToShow = new HashSet<>(); for (GraphChanges.Edge<Integer> e : changes.getChangedEdges()) { if (!e.removed()) { Integer upId = e.upNodeId(); if (upId != null) { Integer upIndex = graph.getNodeIndex(upId); if (upIndex != null) { nodesToShow.add(upIndex); } } Integer downId = e.downNodeId(); if (downId != null) { Integer downIndex = graph.getNodeIndex(downId); if (downIndex != null) { nodesToShow.add(downIndex); } } } } for (GraphChanges.Node<Integer> e : changes.getChangedNodes()) { if (!e.removed()) { Integer nodeIndex = graph.getNodeIndex(e.getNodeId()); if (nodeIndex != null) { nodesToShow.add(nodeIndex); } } } CollapsedActionManager.expandNodes(myCollapsedGraph, nodesToShow); }