mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GT-3019 - Function Graph - Added option for edge routing around vertices
This commit is contained in:
@@ -32,8 +32,8 @@ import ghidra.util.exception.CancelledException;
|
||||
public class SampleGraphPluginDependencyLayout
|
||||
extends AbstractVisualGraphLayout<SampleVertex, SampleEdge> {
|
||||
|
||||
protected SampleGraphPluginDependencyLayout(SampleGraph graph) {
|
||||
super(graph);
|
||||
protected SampleGraphPluginDependencyLayout(SampleGraph graph, String name) {
|
||||
super(graph, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,7 +50,7 @@ public class SampleGraphPluginDependencyLayout
|
||||
}
|
||||
|
||||
SampleGraphPluginDependencyLayout newLayout =
|
||||
new SampleGraphPluginDependencyLayout((SampleGraph) newGraph);
|
||||
new SampleGraphPluginDependencyLayout((SampleGraph) newGraph, getLayoutName());
|
||||
return newLayout;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,20 +30,21 @@ import resources.ResourceManager;
|
||||
public class SampleGraphPluginDependencyLayoutProvider
|
||||
extends AbstractLayoutProvider<SampleVertex, SampleEdge, SampleGraph> {
|
||||
|
||||
private static final String NAME = "Plugin Dependency Layout";
|
||||
private static final Icon DEFAULT_ICON = ResourceManager.loadImage("images/color_swatch.png");
|
||||
|
||||
@Override
|
||||
public VisualGraphLayout<SampleVertex, SampleEdge> getLayout(SampleGraph g, TaskMonitor monitor)
|
||||
throws CancelledException {
|
||||
|
||||
SampleGraphPluginDependencyLayout layout = new SampleGraphPluginDependencyLayout(g);
|
||||
SampleGraphPluginDependencyLayout layout = new SampleGraphPluginDependencyLayout(g, NAME);
|
||||
initVertexLocations(g, layout);
|
||||
return layout;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLayoutName() {
|
||||
return "Plugin Dependency Layout";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
// Note: each provider really should load its own icon so that the toolbar item can
|
||||
|
||||
Reference in New Issue
Block a user