@@ -11,6 +11,7 @@ import org.utbot.engine.isReturn
1111import org.utbot.engine.selectors.PathSelector
1212import org.utbot.engine.stmts
1313import org.utbot.framework.UtSettings.copyVisualizationPathToClipboard
14+ import org.utbot.framework.UtSettings.showLibraryClassesInVisualization
1415import soot.jimple.Stmt
1516import soot.toolkits.graph.ExceptionalUnitGraph
1617import java.awt.Toolkit
@@ -103,7 +104,11 @@ class GraphViz(
103104 graph.allEdges.forEach { edge ->
104105 val (edgeSrc, edgeDst, _) = edge
105106
106- if (stmtToSubgraph[edgeSrc] !in libraryGraphs && stmtToSubgraph[edgeDst] !in libraryGraphs) {
107+ val srcInLibraryMethod = stmtToSubgraph[edgeSrc] in libraryGraphs
108+ val dstInLibraryMethod = stmtToSubgraph[edgeDst] in libraryGraphs
109+ val edgeIsRelatedToLibraryMethod = srcInLibraryMethod || dstInLibraryMethod
110+
111+ if (! edgeIsRelatedToLibraryMethod || showLibraryClassesInVisualization) {
107112 dotGlobalGraph.addDotEdge(edge)
108113 }
109114 }
@@ -143,8 +148,10 @@ class GraphViz(
143148 }
144149
145150 // Filter library methods
146- uncompletedStack.removeIf { it.name in libraryGraphs }
147- fullStack.removeIf { it.name in libraryGraphs }
151+ if (! showLibraryClassesInVisualization) {
152+ uncompletedStack.removeIf { it.name in libraryGraphs }
153+ fullStack.removeIf { it.name in libraryGraphs }
154+ }
148155
149156 // Update nodes and edges properties
150157 dotGlobalGraph.updateProperties(executionState)
0 commit comments