public Collection<GraphEdge> expandEdge(@NotNull final GraphEdge edge) {
    Set<GraphEdge> result = new HashSet<>();

    assert edge.getType() == GraphEdgeType.DOTTED;
    getDottedEdges().removeEdge(edge);

    Integer tail = edge.getUpNodeIndex();
    Integer firstChild = edge.getDownNodeIndex();
    assert tail != null : "Collapsed from to an unloaded node";
    assert firstChild != null : "Collapsed edge to an unloaded node";

    List<GraphEdge> downDottedEdges = getHiddenEdges().getAdjacentEdges(tail, EdgeFilter.NORMAL_DOWN);
    List<GraphEdge> upDottedEdges = getHiddenEdges().getAdjacentEdges(firstChild, EdgeFilter.NORMAL_UP);
    for (GraphEdge e : ContainerUtil.concat(downDottedEdges, upDottedEdges)) {
      getHiddenEdges().removeEdge(e);
      if (e.getType() == GraphEdgeType.DOTTED) {
        result.addAll(expandEdge(e));
      }
      else {
        result.add(e);
      }
    }

    return result;
  }
public Collection<GraphEdge> expandEdge(@NotNull final GraphEdge edge)