Test fixes

This commit is contained in:
dragonmacher 2023-05-11 17:10:45 -04:00
parent f546c8828c
commit 2f2a07c671
5 changed files with 35 additions and 8 deletions

View file

@ -15,8 +15,7 @@
*/
package ghidra.graph;
import java.util.Map;
import java.util.Set;
import java.util.*;
import docking.action.DockingActionIf;
import docking.widgets.EventTrigger;
@ -62,8 +61,7 @@ public class TestGraphDisplay implements GraphDisplay {
}
@Override
public void setGraph(AttributedGraph graph, String title, boolean append,
TaskMonitor monitor)
public void setGraph(AttributedGraph graph, String title, boolean append, TaskMonitor monitor)
throws CancelledException {
if (append) {
this.graph = mergeGraphs(graph, this.graph);
@ -113,6 +111,11 @@ public class TestGraphDisplay implements GraphDisplay {
// do nothing, actions are not supported by this display
}
@Override
public Collection<DockingActionIf> getActions() {
return Collections.emptyList();
}
private AttributedGraph mergeGraphs(AttributedGraph newGraph, AttributedGraph oldGraph) {
for (AttributedVertex vertex : oldGraph.vertexSet()) {
newGraph.addVertex(vertex);