LinearGraphAnswer (@NotNull ActionContext context) { if (isForDelegateGraph(context)) return null; GraphEdge dottedEdge = getDottedEdge(context.getAffectedGraphElement(), context.getCompiledGraph()); if (dottedEdge != null) { int upNodeIndex = context.convertToDelegateNodeIndex(assertInt(dottedEdge.getUpNodeIndex())); int downNodeIndex = context.convertToDelegateNodeIndex(assertInt(dottedEdge.getDownNodeIndex())); if (context.getActionType() == GraphAction.Type.MOUSE_OVER) { return LinearGraphUtils.createSelectedAnswer(context.getDelegatedGraph(), Set.of(upNodeIndex, downNodeIndex)); } Set<Integer> middleNodes = context.myDelegatedFragmentGenerators.fragmentGenerator.getMiddleNodes(upNodeIndex, downNodeIndex, true); CollapsedGraph.Modification modification = context.myCollapsedGraph.startModification(); for (Integer middleNode : middleNodes) { modification.showNode(middleNode); } modification.removeEdge(new GraphEdge(upNodeIndex, downNodeIndex, null, GraphEdgeType.DOTTED)); modification.apply(); return new LinearGraphController.LinearGraphAnswer(GraphChangesUtil.SOME_CHANGES); } return null; }