mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
Miscellanious bug fixes and code clean up.
This commit is contained in:
parent
608e74f873
commit
b647c6cd5b
13 changed files with 405 additions and 346 deletions
|
@ -18,6 +18,7 @@ package ghidra.graph.program;
|
|||
import java.awt.Color;
|
||||
import java.util.*;
|
||||
|
||||
import docking.widgets.EventTrigger;
|
||||
import ghidra.app.plugin.core.colorizer.ColorizingService;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.program.model.address.Address;
|
||||
|
@ -156,12 +157,15 @@ public class BlockGraphTask extends Task {
|
|||
display.setGraph(graph, actionName, appendGraph, monitor);
|
||||
|
||||
if (location != null) {
|
||||
display.setLocation(listener.getVertexIdForAddress(location.getAddress()));
|
||||
// initialize the graph location, but don't have the graph send an event
|
||||
String id = listener.getVertexIdForAddress(location.getAddress());
|
||||
display.setLocationFocus(id, EventTrigger.INTERNAL_ONLY);
|
||||
}
|
||||
if (selection != null && !selection.isEmpty()) {
|
||||
List<String> selectedVertices = listener.getVertices(selection);
|
||||
if (selectedVertices != null) {
|
||||
display.selectVertices(selectedVertices);
|
||||
// intialize the graph selection, but don't have the graph send an event
|
||||
display.selectVertices(selectedVertices, EventTrigger.INTERNAL_ONLY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ package ghidra.graph.program;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import docking.widgets.EventTrigger;
|
||||
import ghidra.service.graph.*;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
@ -37,7 +38,7 @@ public class TestGraphDisplay implements GraphDisplay {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setLocation(String vertexID) {
|
||||
public void setLocationFocus(String vertexID, EventTrigger eventTrigger) {
|
||||
currentFocusedVertex = vertexID;
|
||||
}
|
||||
|
||||
|
@ -46,7 +47,7 @@ public class TestGraphDisplay implements GraphDisplay {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void selectVertices(List<String> vertexList) {
|
||||
public void selectVertices(List<String> vertexList, EventTrigger eventTrigger) {
|
||||
currentSelection = vertexList;
|
||||
}
|
||||
|
||||
|
@ -103,7 +104,7 @@ public class TestGraphDisplay implements GraphDisplay {
|
|||
}
|
||||
|
||||
public void focusChanged(String vertexId) {
|
||||
listener.locationChanged(vertexId);
|
||||
listener.locationFocusChanged(vertexId);
|
||||
}
|
||||
|
||||
public void selectionChanged(List<String> vertexIds) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue