mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 14:05:56 +08:00
Merge remote-tracking branch 'origin/GP-3047-dragonmacher-fg-exception'
(Closes #4916)
This commit is contained in:
+13
-9
@@ -33,11 +33,11 @@ import ghidra.graph.viewer.event.mouse.VertexMouseInfo;
|
|||||||
* A base component provider for displaying {@link VisualGraph}s
|
* A base component provider for displaying {@link VisualGraph}s
|
||||||
*
|
*
|
||||||
* <p>This class will provide many optional sub-features, enabled as desired by calling the
|
* <p>This class will provide many optional sub-features, enabled as desired by calling the
|
||||||
* various <code>addXyzFeature()</code> methods.
|
* various <code>addXyzFeature()</code> methods.
|
||||||
*
|
*
|
||||||
* <p>Implementation Notes: to get full functionality, you must:
|
* <p>Implementation Notes: to get full functionality, you must:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Have your plugin call {@link #readConfigState(SaveState)} and
|
* <li>Have your plugin call {@link #readConfigState(SaveState)} and
|
||||||
* {@link #writeConfigState(SaveState)} to save user settings.
|
* {@link #writeConfigState(SaveState)} to save user settings.
|
||||||
* </li>
|
* </li>
|
||||||
* <li>Enable features you desire after calling your {@link #addToTool()} method.
|
* <li>Enable features you desire after calling your {@link #addToTool()} method.
|
||||||
@@ -49,9 +49,9 @@ import ghidra.graph.viewer.event.mouse.VertexMouseInfo;
|
|||||||
* @param <G> the graph type
|
* @param <G> the graph type
|
||||||
*/
|
*/
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
public abstract class VisualGraphComponentProvider<V extends VisualVertex,
|
public abstract class VisualGraphComponentProvider<V extends VisualVertex,
|
||||||
E extends VisualEdge<V>,
|
E extends VisualEdge<V>,
|
||||||
G extends VisualGraph<V, E>>
|
G extends VisualGraph<V, E>>
|
||||||
extends ComponentProvider {
|
extends ComponentProvider {
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
|
|
||||||
@@ -104,6 +104,10 @@ public abstract class VisualGraphComponentProvider<V extends VisualVertex,
|
|||||||
public Set<V> getSelectedVertices() {
|
public Set<V> getSelectedVertices() {
|
||||||
VisualGraphView<V, E, G> view = getView();
|
VisualGraphView<V, E, G> view = getView();
|
||||||
VisualizationViewer<V, E> viewer = view.getPrimaryGraphViewer();
|
VisualizationViewer<V, E> viewer = view.getPrimaryGraphViewer();
|
||||||
|
if (viewer == null) {
|
||||||
|
// we have seen this happen on some systems; timing issue?
|
||||||
|
return Collections.emptySet();
|
||||||
|
}
|
||||||
PickedState<V> pickedState = viewer.getPickedVertexState();
|
PickedState<V> pickedState = viewer.getPickedVertexState();
|
||||||
return pickedState.getPicked();
|
return pickedState.getPicked();
|
||||||
}
|
}
|
||||||
@@ -127,7 +131,7 @@ public abstract class VisualGraphComponentProvider<V extends VisualVertex,
|
|||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
// Featurette Methods
|
// Featurette Methods
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the satellite viewer functionality to this provider
|
* Adds the satellite viewer functionality to this provider
|
||||||
@@ -164,14 +168,14 @@ public abstract class VisualGraphComponentProvider<V extends VisualVertex,
|
|||||||
|
|
||||||
Undo/redo for graph operations (delete; group/ungroup; move)
|
Undo/redo for graph operations (delete; group/ungroup; move)
|
||||||
-rapid pressing will shortcut items
|
-rapid pressing will shortcut items
|
||||||
-undo/redo allows us to prune nodes
|
-undo/redo allows us to prune nodes
|
||||||
--how to maintain old nodes/edges? (FilteringVisualGraph)
|
--how to maintain old nodes/edges? (FilteringVisualGraph)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
// Provider Methods
|
// Provider Methods
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To be called at the end of this provider's lifecycle
|
* To be called at the end of this provider's lifecycle
|
||||||
|
|||||||
Reference in New Issue
Block a user