@@ -11,6 +11,7 @@ import org.utbot.engine.isReturn
11
11
import org.utbot.engine.selectors.PathSelector
12
12
import org.utbot.engine.stmts
13
13
import org.utbot.framework.UtSettings.copyVisualizationPathToClipboard
14
+ import org.utbot.framework.UtSettings.showLibraryClassesInVisualization
14
15
import soot.jimple.Stmt
15
16
import soot.toolkits.graph.ExceptionalUnitGraph
16
17
import java.awt.Toolkit
@@ -103,7 +104,11 @@ class GraphViz(
103
104
graph.allEdges.forEach { edge ->
104
105
val (edgeSrc, edgeDst, _) = edge
105
106
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) {
107
112
dotGlobalGraph.addDotEdge(edge)
108
113
}
109
114
}
@@ -143,8 +148,10 @@ class GraphViz(
143
148
}
144
149
145
150
// 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
+ }
148
155
149
156
// Update nodes and edges properties
150
157
dotGlobalGraph.updateProperties(executionState)
0 commit comments