Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-757 - Function Graph - review fixes

dragonmacher859e09e4bcd2
diff --git a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/FGComponent.java b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/FGComponent.java
index df54fdde86..5ff8fb5e7d 100644
--- a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/FGComponent.java
+++ b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/FGComponent.java
@@ -224,8 +224,10 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
Color bgColor = options.getGraphBackgroundColor();
if (bgColor.equals(VisualGraphOptions.DEFAULT_GRAPH_BACKGROUND_COLOR)) {
- // Give user notice when seeing the graph for a non-function. Don't do this if the
- // user has manually set the background color (this would require another option).
+ // Give user notice when seeing the graph for a non-function (such as an undefined
+ // function), as this is typical for Ghidra UI widgets.
+ // Don't do this if the user has manually set the background color (this would require
+ // another option).
Function function = functionGraphData.getFunction();
if (function instanceof UndefinedFunction) {
viewer.setBackground(UNDEFINED_FUNCTION_COLOR);
diff --git a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/FGVertex.java b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/FGVertex.java
index aa91525a45..2ba6a0d9fb 100644
--- a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/FGVertex.java
+++ b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/FGVertex.java
@@ -93,15 +93,17 @@ public interface FGVertex extends VisualVertex {
public void clearColor();
/**
- * Signals to this vertex that it is associated with a group. False implies that this vertex
- * is not and has not been part of a group. True signals that this vertex is not currently
- * grouped, but that it has been part of a group and can be put back into its group form
- * again.
+ * Signals to this vertex that it is associated with a group
*
- * @param groupInfo True if this vertex is a associate with a group
+ * @param groupInfo the new group info for this vertex; null if the vertex is no longer part
+ * of a group
*/
public void updateGroupAssociationStatus(GroupHistoryInfo groupInfo);
+ /**
+ * The group info for this vertex if it is in a group; null if not in a group
+ * @return the group info or null
+ */
public GroupHistoryInfo getGroupInfo();
/**
diff --git a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/SatelliteGraphViewer.java b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/SatelliteGraphViewer.java
index c178f7d2ac..71f04eb432 100644
--- a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/SatelliteGraphViewer.java
+++ b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/SatelliteGraphViewer.java
@@ -75,11 +75,18 @@ public class SatelliteGraphViewer<V extends VisualVertex, E extends VisualEdge<V
return new VisualVertexSatelliteRenderer<>();
}
+ /**
+ * The options for this viewer
+ * @param options the options
+ */
public void setGraphOptions(VisualGraphOptions options) {
this.options = options;
optionsChanged();
}
+ /**
+ * Called to signal that the options used by this viewer have changed
+ */
public void optionsChanged() {
setBackground(options.getGraphBackgroundColor());
}