Ghidra is a software reverse engineering (SRE) framework
GP-3667 Cleaning up weird behavior of GraphDisplayOptions to register options when given a tool
ghidragon04fa097f588b
diff --git a/Ghidra/Extensions/SampleTablePlugin/src/main/java/ghidra/examples/SampleTableProvider.java b/Ghidra/Extensions/SampleTablePlugin/src/main/java/ghidra/examples/SampleTableProvider.javaindex a8f71f720a..e0db83acf8 100644--- a/Ghidra/Extensions/SampleTablePlugin/src/main/java/ghidra/examples/SampleTableProvider.java+++ b/Ghidra/Extensions/SampleTablePlugin/src/main/java/ghidra/examples/SampleTableProvider.java@@ -24,6 +24,7 @@ import javax.swing.*;import docking.ActionContext;import docking.action.*;+import docking.options.OptionsService;import docking.widgets.checkbox.GCheckBox;import docking.widgets.filechooser.GhidraFileChooserPanel;import docking.widgets.table.GFilterTable;@@ -31,7 +32,6 @@ import generic.theme.GIcon;import ghidra.framework.options.OptionsChangeListener;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.ComponentProviderAdapter;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.util.*;import ghidra.util.classfinder.ClassSearcher;import ghidra.util.layout.MiddleLayout;diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/eclipse/EclipseIntegrationPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/eclipse/EclipseIntegrationPlugin.javaindex c12c525a65..b9122c4709 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/eclipse/EclipseIntegrationPlugin.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/eclipse/EclipseIntegrationPlugin.java@@ -20,6 +20,7 @@ import java.util.*;import java.util.zip.ZipEntry;import java.util.zip.ZipFile;+import docking.options.OptionsService;import docking.widgets.OptionDialog;import generic.jar.ResourceFile;import ghidra.app.CorePluginPackage;@@ -31,7 +32,6 @@ import ghidra.framework.main.AppInfo;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginInfo;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.framework.plugintool.util.PluginStatus;import ghidra.util.Msg;import ghidra.util.SystemUtilities;diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/NavigationOptions.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/NavigationOptions.javaindex 617b9de18b..79e6ada803 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/NavigationOptions.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/NavigationOptions.java@@ -15,11 +15,11 @@*/package ghidra.app.plugin.core.navigation;+import docking.options.OptionsService;import ghidra.GhidraOptions;import ghidra.framework.options.OptionsChangeListener;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.util.HelpLocation;public class NavigationOptions implements OptionsChangeListener {diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/SymbolInspector.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/SymbolInspector.javaindex 35e46adcba..790faf234b 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/SymbolInspector.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/SymbolInspector.java@@ -20,6 +20,7 @@ import java.awt.Component;import java.util.HashMap;import java.util.Map;+import docking.options.OptionsService;import generic.theme.GThemeDefaults.Colors;import ghidra.GhidraOptions;import ghidra.app.util.viewer.options.OptionsGui;@@ -27,7 +28,6 @@ import ghidra.app.util.viewer.options.ScreenElement;import ghidra.framework.options.OptionsChangeListener;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.ServiceProvider;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.database.symbol.FunctionSymbol;import ghidra.program.model.address.Address;import ghidra.program.model.listing.*;diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/BrowserCodeUnitFormat.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/BrowserCodeUnitFormat.javaindex 242211b0e3..351308668c 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/BrowserCodeUnitFormat.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/BrowserCodeUnitFormat.java@@ -17,10 +17,10 @@ package ghidra.app.util.viewer.field;import javax.swing.event.ChangeListener;+import docking.options.OptionsService;import ghidra.GhidraOptions;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.ServiceProvider;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.listing.CodeUnitFormat;/**diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OperandFieldMouseHandler.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OperandFieldMouseHandler.javaindex 604734b640..4d5bc35d87 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OperandFieldMouseHandler.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OperandFieldMouseHandler.java@@ -19,6 +19,7 @@ import java.awt.event.MouseEvent;import java.util.ArrayList;import java.util.List;+import docking.options.OptionsService;import ghidra.app.nav.Navigatable;import ghidra.app.nav.NavigationUtils;import ghidra.app.plugin.core.navigation.NavigationOptions;@@ -27,7 +28,6 @@ import ghidra.app.services.GoToService;import ghidra.app.util.PseudoDisassembler;import ghidra.app.util.query.TableService;import ghidra.framework.plugintool.ServiceProvider;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.address.AddressSpace;import ghidra.program.model.data.Playable;diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingCodeComparisonPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingCodeComparisonPanel.javaindex d2afe56354..c019d893f1 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingCodeComparisonPanel.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingCodeComparisonPanel.java@@ -28,6 +28,7 @@ import docking.*;import docking.action.*;import docking.menu.ActionState;import docking.menu.MultiStateDockingAction;+import docking.options.OptionsService;import docking.widgets.EventTrigger;import docking.widgets.fieldpanel.FieldPanel;import docking.widgets.fieldpanel.field.Field;@@ -50,7 +51,6 @@ import ghidra.app.util.viewer.util.*;import ghidra.framework.options.*;import ghidra.framework.plugintool.PluginTool;import ghidra.framework.plugintool.ServiceProviderDecorator;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.*;import ghidra.program.model.correlate.HashedFunctionAddressCorrelation;import ghidra.program.model.listing.*;diff --git a/Ghidra/Features/Base/src/main/java/ghidra/graph/ProgramGraphDisplayOptions.java b/Ghidra/Features/Base/src/main/java/ghidra/graph/ProgramGraphDisplayOptions.javaindex cc385a1665..2b9314b935 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/graph/ProgramGraphDisplayOptions.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/graph/ProgramGraphDisplayOptions.java@@ -21,6 +21,7 @@ import static ghidra.service.graph.VertexShape.*;import ghidra.framework.plugintool.PluginTool;import ghidra.service.graph.GraphDisplayOptions;import ghidra.service.graph.VertexShape;+import ghidra.util.HelpLocation;/*** {@link GraphDisplayOptions} for {@link ProgramGraphType}@@ -33,7 +34,8 @@ public class ProgramGraphDisplayOptions extends GraphDisplayOptions {* @param tool if non-null, will load values from tool options*/public ProgramGraphDisplayOptions(ProgramGraphType graphType, PluginTool tool) {- super(graphType, tool);+ super(graphType, tool,+ new HelpLocation("ProgramGraphPlugin", "Program Graphs Display Options"));}@Overridediff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.javaindex 22f0726379..c29d4c4019 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.java@@ -20,10 +20,10 @@ import java.net.URL;import java.util.ArrayList;import java.util.List;+import docking.options.OptionsService;import ghidra.framework.options.OptionsChangeListener;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.ServiceProvider;-import ghidra.framework.plugintool.util.OptionsService;/*** BrowserLoader opens a web browser and displays the given url.diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/ShowCCallsScript.java b/Ghidra/Features/Decompiler/ghidra_scripts/ShowCCallsScript.javaindex 54b5a0fe1d..1761f4533e 100644--- a/Ghidra/Features/Decompiler/ghidra_scripts/ShowCCallsScript.java+++ b/Ghidra/Features/Decompiler/ghidra_scripts/ShowCCallsScript.java@@ -25,10 +25,10 @@import java.util.Iterator;+import docking.options.OptionsService;import ghidra.app.decompiler.*;import ghidra.app.script.GhidraScript;import ghidra.framework.options.ToolOptions;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.listing.*;import ghidra.program.model.pcode.HighFunction;diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/ShowConstantUse.java b/Ghidra/Features/Decompiler/ghidra_scripts/ShowConstantUse.javaindex 28a80e6766..bbcd7198d9 100644--- a/Ghidra/Features/Decompiler/ghidra_scripts/ShowConstantUse.java+++ b/Ghidra/Features/Decompiler/ghidra_scripts/ShowConstantUse.java@@ -25,13 +25,13 @@import java.util.*;+import docking.options.OptionsService;import generic.jar.ResourceFile;import ghidra.app.decompiler.*;import ghidra.app.decompiler.component.DecompilerUtils;import ghidra.app.script.*;import ghidra.app.tablechooser.*;import ghidra.framework.options.ToolOptions;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.address.AddressSpace;import ghidra.program.model.lang.Register;diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/StringParameterPropagator.java b/Ghidra/Features/Decompiler/ghidra_scripts/StringParameterPropagator.javaindex ad0888d9be..1cadb8e6df 100644--- a/Ghidra/Features/Decompiler/ghidra_scripts/StringParameterPropagator.java+++ b/Ghidra/Features/Decompiler/ghidra_scripts/StringParameterPropagator.java@@ -31,7 +31,6 @@ import ghidra.app.decompiler.*;import ghidra.app.script.GhidraScript;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.data.*;import ghidra.program.model.lang.PrototypeModel;@@ -42,6 +41,8 @@ import ghidra.util.exception.*;import java.util.*;+import docking.options.OptionsService;+public class StringParameterPropagator extends GhidraScript {// TODO!! Error handling needs a lot of work !!diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/WindowsResourceReference.java b/Ghidra/Features/Decompiler/ghidra_scripts/WindowsResourceReference.javaindex 2e94b848a5..fcdd801561 100644--- a/Ghidra/Features/Decompiler/ghidra_scripts/WindowsResourceReference.java+++ b/Ghidra/Features/Decompiler/ghidra_scripts/WindowsResourceReference.java@@ -31,11 +31,11 @@ import java.util.*;import java.util.regex.Matcher;import java.util.regex.Pattern;+import docking.options.OptionsService;import ghidra.app.decompiler.*;import ghidra.app.script.GhidraScript;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.*;import ghidra.program.model.listing.*;import ghidra.program.model.pcode.*;diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/DecompilerScriptUtils.java b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/DecompilerScriptUtils.javaindex d1e62c4a49..a2e07403aa 100644--- a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/DecompilerScriptUtils.java+++ b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/DecompilerScriptUtils.java@@ -15,12 +15,12 @@*///DO NOT RUN. THIS IS NOT A SCRIPT! THIS IS A CLASS THAT IS USED BY SCRIPTS.package classrecovery;+import docking.options.OptionsService;import ghidra.app.decompiler.DecompInterface;import ghidra.app.decompiler.DecompileOptions;import ghidra.app.decompiler.DecompileResults;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.data.DataType;import ghidra.program.model.data.ParameterDefinition;diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/EditPropertiesAction.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/EditPropertiesAction.javaindex 025785766d..49196b2977 100644--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/EditPropertiesAction.java+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/EditPropertiesAction.java@@ -18,9 +18,9 @@ package ghidra.app.plugin.core.decompile.actions;import docking.ActionContext;import docking.action.DockingAction;import docking.action.MenuData;+import docking.options.OptionsService;import ghidra.app.util.HelpTopics;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.util.HelpLocation;public class EditPropertiesAction extends DockingAction {diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/FillOutStructureCmd.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/FillOutStructureCmd.javaindex f233e4bc98..3e902beda7 100644--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/FillOutStructureCmd.java+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/FillOutStructureCmd.java@@ -18,13 +18,13 @@ package ghidra.app.plugin.core.decompile.actions;import java.util.*;import java.util.Map.Entry;+import docking.options.OptionsService;import ghidra.app.cmd.label.RenameLabelCmd;import ghidra.app.decompiler.*;import ghidra.framework.cmd.BackgroundCommand;import ghidra.framework.model.DomainObject;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.address.AddressSet;import ghidra.program.model.data.*;diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/PCodeDfgDisplayOptions.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/PCodeDfgDisplayOptions.javaindex d01ba7b102..34f15f2bee 100644--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/PCodeDfgDisplayOptions.java+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/PCodeDfgDisplayOptions.java@@ -18,8 +18,10 @@ package ghidra.app.plugin.core.decompile.actions;import static ghidra.app.plugin.core.decompile.actions.PCodeDfgGraphType.*;import static ghidra.service.graph.VertexShape.*;+import ghidra.app.util.HelpTopics;import ghidra.framework.plugintool.PluginTool;import ghidra.service.graph.*;+import ghidra.util.HelpLocation;/*** {@link GraphDisplayOptions} for {@link PCodeDfgGraphType}@@ -48,7 +50,8 @@ public class PCodeDfgDisplayOptions extends GraphDisplayOptions {* @param tool if non-null, will load values from tool options*/public PCodeDfgDisplayOptions(PluginTool tool) {- super(new PCodeDfgGraphType(), tool);+ super(new PCodeDfgGraphType(), tool,+ new HelpLocation(HelpTopics.DECOMPILER, "DataFlowGraph"));}@Overridediff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/util/exporter/CppExporter.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/util/exporter/CppExporter.javaindex a7282c408b..017274b0ef 100644--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/util/exporter/CppExporter.java+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/util/exporter/CppExporter.java@@ -20,6 +20,7 @@ import java.util.*;import org.apache.commons.lang3.StringUtils;+import docking.options.OptionsService;import generic.cache.CachingPool;import generic.cache.CountingBasicFactory;import generic.concurrent.QCallback;@@ -31,7 +32,6 @@ import ghidra.app.decompiler.parallel.ParallelDecompiler;import ghidra.app.util.*;import ghidra.framework.model.DomainObject;import ghidra.framework.options.ToolOptions;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.address.AddressSetView;import ghidra.program.model.data.*;diff --git a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClang2Test.java b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClang2Test.javaindex b79974b7b0..67c2f5e757 100644--- a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClang2Test.java+++ b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClang2Test.java@@ -19,11 +19,11 @@ import org.junit.Before;import org.junit.Test;import docking.action.DockingActionIf;+import docking.options.OptionsService;import ghidra.app.decompiler.ClangToken;import ghidra.app.decompiler.DecompileOptions.NamespaceStrategy;import ghidra.app.plugin.core.decompile.AbstractDecompilerTest;import ghidra.framework.options.ToolOptions;-import ghidra.framework.plugintool.util.OptionsService;public class DecompilerClang2Test extends AbstractDecompilerTest {diff --git a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClangTest.java b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClangTest.javaindex b71b540bbd..0160de996e 100644--- a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClangTest.java+++ b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/decompiler/component/DecompilerClangTest.java@@ -30,6 +30,7 @@ import org.junit.Before;import org.junit.Test;import docking.action.DockingActionIf;+import docking.options.OptionsService;import docking.options.editor.GhidraColorChooser;import docking.widgets.dialogs.InputDialog;import docking.widgets.fieldpanel.FieldPanel;@@ -44,7 +45,6 @@ import ghidra.app.plugin.core.decompile.DecompilerProvider;import ghidra.app.plugin.core.decompile.actions.*;import ghidra.app.util.AddEditDialog;import ghidra.framework.options.ToolOptions;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.listing.CodeUnit;public class DecompilerClangTest extends AbstractDecompilerTest {diff --git a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerFindReferencesToNestedStructureActionTest.java b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerFindReferencesToNestedStructureActionTest.javaindex 5a174baa6c..b57847f7cd 100644--- a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerFindReferencesToNestedStructureActionTest.java+++ b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerFindReferencesToNestedStructureActionTest.java@@ -18,9 +18,9 @@ package ghidra.app.plugin.core.decompile;import org.junit.Before;import org.junit.Test;+import docking.options.OptionsService;import ghidra.app.decompiler.DecompileOptions.NamespaceStrategy;import ghidra.framework.options.ToolOptions;-import ghidra.framework.plugintool.util.OptionsService;/*** This test is very similar in concept to {@link DecompilerFindReferencesToActionTest},diff --git a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FGActionManager.java b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FGActionManager.javaindex f10fc0aff4..cc3c2214cd 100644--- a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FGActionManager.java+++ b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FGActionManager.java@@ -27,6 +27,7 @@ import docking.DockingUtils;import docking.action.*;import docking.menu.ActionState;import docking.menu.MultiStateDockingAction;+import docking.options.OptionsService;import docking.widgets.EventTrigger;import docking.widgets.OptionDialog;import edu.uci.ics.jung.graph.Graph;@@ -42,7 +43,6 @@ import ghidra.app.plugin.core.functiongraph.mvc.FGController;import ghidra.app.plugin.core.functiongraph.mvc.FGData;import ghidra.framework.options.SaveState;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.AddressSet;import ghidra.program.model.address.AddressSetView;import ghidra.program.model.listing.Function;diff --git a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FunctionGraphPlugin.java b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FunctionGraphPlugin.javaindex aae7b212ee..c768124e32 100644--- a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FunctionGraphPlugin.java+++ b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/FunctionGraphPlugin.java@@ -21,6 +21,7 @@ import javax.swing.Icon;import org.jdom.Element;+import docking.options.OptionsService;import docking.tool.ToolConstants;import generic.theme.GIcon;import ghidra.GhidraOptions;@@ -38,7 +39,6 @@ import ghidra.framework.model.DomainFile;import ghidra.framework.options.*;import ghidra.framework.plugintool.PluginInfo;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.framework.plugintool.util.PluginStatus;import ghidra.graph.viewer.options.VisualGraphOptions;import ghidra.program.model.listing.Program;diff --git a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/mvc/FGController.java b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/mvc/FGController.javaindex 4d53daab0b..94f7ae7455 100644--- a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/mvc/FGController.java+++ b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/mvc/FGController.java@@ -28,6 +28,7 @@ import javax.swing.SwingUtilities;import com.google.common.cache.*;+import docking.options.OptionsService;import docking.widgets.EventTrigger;import docking.widgets.fieldpanel.support.FieldLocation;import docking.widgets.fieldpanel.support.Highlight;@@ -50,7 +51,6 @@ import ghidra.app.util.viewer.listingpanel.*;import ghidra.framework.options.SaveState;import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.graph.viewer.*;import ghidra.program.model.address.*;import ghidra.program.model.listing.*;diff --git a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.javaindex 3d8786cafe..0898eeb37e 100644--- a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java+++ b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java@@ -49,16 +49,12 @@ import docking.action.ToggleDockingAction;import docking.action.builder.*;import docking.menu.ActionState;import docking.menu.MultiStateDockingAction;-import docking.options.editor.OptionsDialog;import docking.widgets.EventTrigger;import docking.widgets.OptionDialog;import generic.theme.GColor;import generic.theme.GThemeDefaults.Colors;import generic.util.WindowUtilities;-import ghidra.framework.options.Options;-import ghidra.framework.options.ToolOptions;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.graph.AttributeFilters;import ghidra.graph.job.GraphJobRunner;import ghidra.graph.viewer.popup.*;@@ -166,7 +162,7 @@ public class DefaultGraphDisplay implements GraphDisplay {private SelectedEdgePaintable<AttributedVertex, AttributedEdge> selectedEdgePaintable;- private GraphDisplayOptions graphDisplayOptions = GraphDisplayOptions.DEFAULT;+ private GraphDisplayOptions graphDisplayOptions = new DefaultGraphDisplayOptions();private ChangeListener graphDisplayOptionsChangeListener;@@ -524,30 +520,8 @@ public class DefaultGraphDisplay implements GraphDisplay {}private void editGraphDisplayOptions() {- String rootOptionsName = graphDisplayOptions.getRootOptionsName();- String relativePath = rootOptionsName + ".Vertex Colors";-- // if the options are registered in the tool options, just show them- // otherwise, create a transient options and create an options dialog. This will- // allow the user to edit the options for the current graph instance.-- if (graphDisplayOptions.isRegisteredWithTool()) {- OptionsService service = tool.getService(OptionsService.class);- service.showOptionsDialog("Graph." + relativePath, "");- }- else {- ToolOptions transientOptions = new ToolOptions("Graph");- HelpLocation help = new HelpLocation("GraphServices", "Graph Type Display Options");- graphDisplayOptions.registerOptions(transientOptions, help);- transientOptions.addOptionsChangeListener(graphDisplayOptions);- Options[] optionsArray = new Options[] { transientOptions };- String dialogTitle = "Graph Instance Settings (Not Saved in Tool Options)";- OptionsDialog dialog = new OptionsDialog(dialogTitle, "Graph", optionsArray, null);- // we have one less level for these transient tool options, so no need to prepend "graph."- dialog.displayCategory(relativePath, "");- tool.showDialog(dialog, componentProvider);- dialog.dispose();- }+ HelpLocation help = new HelpLocation("GraphServices", "Graph Type Display Options");+ graphDisplayOptions.displayEditor(tool, help);}private void groupSelectedVertices() {diff --git a/Ghidra/Features/ProgramGraph/src/main/java/ghidra/graph/program/ProgramGraphPlugin.java b/Ghidra/Features/ProgramGraph/src/main/java/ghidra/graph/program/ProgramGraphPlugin.javaindex e23400d78c..34b4dd4db7 100644--- a/Ghidra/Features/ProgramGraph/src/main/java/ghidra/graph/program/ProgramGraphPlugin.java+++ b/Ghidra/Features/ProgramGraph/src/main/java/ghidra/graph/program/ProgramGraphPlugin.java@@ -111,12 +111,9 @@ public class ProgramGraphPlugin extends ProgramPlugin}private void registerProgramFlowGraphDisplayOptionsWithTool() {- ProgramGraphDisplayOptions displayOptions =- new ProgramGraphDisplayOptions(new BlockFlowGraphType(), null);-- // this will register Program Flow Graph Type options with the tool- HelpLocation help = new HelpLocation(getName(), "Program Graphs Display Options");- displayOptions.registerOptions(tool.getOptions("Graph"), help);+ // We don't need one of this right now, but creating it will make sure it+ // shows up in the tool options+ new ProgramGraphDisplayOptions(new BlockFlowGraphType(), tool);}private void intializeOptions() {@@ -188,80 +185,76 @@ public class ProgramGraphPlugin extends ProgramPluginprivate void createActions() {- new ActionBuilder("Graph Block Flow", getName())- .menuPath(MENU_GRAPH, "&Block Flow")- .menuGroup(MENU_GRAPH, "A")- .onAction(c -> graphBlockFlow())- .enabledWhen(this::canGraph)- .buildAndInstall(tool);+ new ActionBuilder("Graph Block Flow", getName()).menuPath(MENU_GRAPH, "&Block Flow")+ .menuGroup(MENU_GRAPH, "A")+ .onAction(c -> graphBlockFlow())+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);- new ActionBuilder("Graph Code Flow", getName())- .menuPath(MENU_GRAPH, "C&ode Flow")- .menuGroup(MENU_GRAPH, "B")- .onAction(c -> graphCodeFlow())- .enabledWhen(this::canGraph)- .buildAndInstall(tool);+ new ActionBuilder("Graph Code Flow", getName()).menuPath(MENU_GRAPH, "C&ode Flow")+ .menuGroup(MENU_GRAPH, "B")+ .onAction(c -> graphCodeFlow())+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);new ActionBuilder("Graph Calls Using Default Model", getName())- .menuPath(MENU_GRAPH, "&Calls")- .menuGroup(MENU_GRAPH, "C")- .onAction(c -> createDefaultCallGraph())- .enabledWhen(this::canGraph)- .buildAndInstall(tool);+ .menuPath(MENU_GRAPH, "&Calls")+ .menuGroup(MENU_GRAPH, "C")+ .onAction(c -> createDefaultCallGraph())+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);tool.setMenuGroup(new String[] { MENU_GRAPH, "Data" }, "Graph", "Data");HelpLocation helpLoc = new HelpLocation(getName(), "Data_Reference_Graph");new ActionBuilder("Graph To/From Data References", getName())- .menuPath(MENU_GRAPH, "Data", "To/From &References")- .menuGroup(MENU_GRAPH, "Data")- .helpLocation(helpLoc)- .onAction(c -> graphDataReferences())- .enabledWhen(this::canGraph)- .buildAndInstall(tool);+ .menuPath(MENU_GRAPH, "Data", "To/From &References")+ .menuGroup(MENU_GRAPH, "Data")+ .helpLocation(helpLoc)+ .onAction(c -> graphDataReferences())+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);new ActionBuilder("Graph To Data References", getName())- .menuPath(MENU_GRAPH, "Data", "&To References")- .menuGroup(MENU_GRAPH, "Data")- .helpLocation(helpLoc)- .onAction(c -> graphToDataReferences())- .enabledWhen(this::canGraph)- .buildAndInstall(tool);+ .menuPath(MENU_GRAPH, "Data", "&To References")+ .menuGroup(MENU_GRAPH, "Data")+ .helpLocation(helpLoc)+ .onAction(c -> graphToDataReferences())+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);new ActionBuilder("Graph From Data References", getName())- .menuPath(MENU_GRAPH, "Data", "&From References")- .menuGroup(MENU_GRAPH, "Data")- .helpLocation(helpLoc)- .onAction(c -> graphFromDataReferences())- .enabledWhen(this::canGraph)- .buildAndInstall(tool);-- reuseGraphAction =- new ToggleActionBuilder("Reuse Graph", getName())- .menuPath(MENU_GRAPH, "Reuse Graph")- .menuGroup("Graph Options")- .selected(reuseGraph)- .onAction(c -> reuseGraph = reuseGraphAction.isSelected())+ .menuPath(MENU_GRAPH, "Data", "&From References")+ .menuGroup(MENU_GRAPH, "Data")+ .helpLocation(helpLoc)+ .onAction(c -> graphFromDataReferences()).enabledWhen(this::canGraph).buildAndInstall(tool);+ reuseGraphAction =+ new ToggleActionBuilder("Reuse Graph", getName()).menuPath(MENU_GRAPH, "Reuse Graph")+ .menuGroup("Graph Options")+ .selected(reuseGraph)+ .onAction(c -> reuseGraph = reuseGraphAction.isSelected())+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);+appendGraphAction =- new ToggleActionBuilder("Append Graph", getName())- .menuPath(MENU_GRAPH, "Append Graph")+ new ToggleActionBuilder("Append Graph", getName()).menuPath(MENU_GRAPH, "Append Graph")+ .menuGroup("Graph Options")+ .selected(false)+ .onAction(c -> updateAppendAndReuseGraph())+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);++ forceLocationVisibleAction = new ToggleActionBuilder("Show Location in Graph", getName())+ .menuPath(MENU_GRAPH, "Show Location")+ .description("Tell the graph to pan/scale as need to keep location changes visible").menuGroup("Graph Options")- .selected(false)- .onAction(c -> updateAppendAndReuseGraph())+ .onAction(c -> toggleForceLocationVisible()).enabledWhen(this::canGraph).buildAndInstall(tool);- forceLocationVisibleAction = new ToggleActionBuilder("Show Location in Graph", getName())- .menuPath(MENU_GRAPH, "Show Location")- .description("Tell the graph to pan/scale as need to keep location changes visible")- .menuGroup("Graph Options")- .onAction(c -> toggleForceLocationVisible())- .enabledWhen(this::canGraph)- .buildAndInstall(tool);-updateSubroutineActions();}@@ -309,12 +302,12 @@ public class ProgramGraphPlugin extends ProgramPluginprivate DockingAction buildGraphActionWithModel(String blockModelName, HelpLocation helpLoc) {return new ActionBuilder("Graph Calls using " + blockModelName, getName())- .menuPath(MENU_GRAPH, "Calls Using Model", blockModelName)- .menuGroup(MENU_GRAPH, "C")- .helpLocation(helpLoc)- .onAction(c -> createCallGraphUsing(blockModelName))- .enabledWhen(this::canGraph)- .buildAndInstall(tool);+ .menuPath(MENU_GRAPH, "Calls Using Model", blockModelName)+ .menuGroup(MENU_GRAPH, "C")+ .helpLocation(helpLoc)+ .onAction(c -> createCallGraphUsing(blockModelName))+ .enabledWhen(this::canGraph)+ .buildAndInstall(tool);}private void graphBlockFlow() {@@ -349,10 +342,8 @@ public class ProgramGraphPlugin extends ProgramPlugintry {CodeBlockModel model =blockModelService.getNewModelByName(modelName, currentProgram, true);- BlockGraphTask task =- new BlockGraphTask(graphType, graphEntryPointNexus,- reuseGraph, appendToGraph, tool, currentSelection, currentLocation, model,- defaultGraphService);+ BlockGraphTask task = new BlockGraphTask(graphType, graphEntryPointNexus, reuseGraph,+ appendToGraph, tool, currentSelection, currentLocation, model, defaultGraphService);task.setCodeLimitPerBlock(codeLimitPerBlock);new TaskLauncher(task, tool.getToolFrame());}diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/matchtable/VTMatchApplySettingsAction.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/matchtable/VTMatchApplySettingsAction.javaindex bcd861449f..c962fd868a 100644--- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/matchtable/VTMatchApplySettingsAction.java+++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/matchtable/VTMatchApplySettingsAction.java@@ -19,11 +19,11 @@ import javax.swing.Icon;import docking.ActionContext;import docking.action.*;+import docking.options.OptionsService;import generic.theme.GIcon;import ghidra.feature.vt.gui.plugin.VTController;import ghidra.feature.vt.gui.plugin.VTPlugin;import ghidra.framework.plugintool.PluginTool;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.util.HelpLocation;public class VTMatchApplySettingsAction extends DockingAction {diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/util/OptionsService.java b/Ghidra/Framework/Docking/src/main/java/docking/options/OptionsService.javasimilarity index 98%rename from Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/util/OptionsService.javarename to Ghidra/Framework/Docking/src/main/java/docking/options/OptionsService.javaindex 8d3d73ee72..7efbf21c87 100644--- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/util/OptionsService.java+++ b/Ghidra/Framework/Docking/src/main/java/docking/options/OptionsService.java@@ -13,7 +13,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.framework.plugintool.util;+package docking.options;import ghidra.framework.options.Options;import ghidra.framework.options.ToolOptions;diff --git a/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/GraphDisplayOptions.java b/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/GraphDisplayOptions.javaindex f02cfa4250..df4ad9bae3 100644--- a/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/GraphDisplayOptions.java+++ b/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/GraphDisplayOptions.java@@ -24,6 +24,7 @@ import javax.swing.event.ChangeEvent;import javax.swing.event.ChangeListener;import docking.Tool;+import docking.options.OptionsService;import docking.options.editor.*;import generic.theme.GColor;import generic.theme.Gui;@@ -38,8 +39,6 @@ import ghidra.util.bean.opteditor.OptionsVetoException;*/public class GraphDisplayOptions implements OptionsChangeListener {- public static final GraphDisplayOptions DEFAULT = new GraphDisplayOptions(new EmptyGraphType());-private static final String FONT = "Font";private static final String LABEL_POSITION = "Label Position";private static final String USE_ICONS = "Use Icons";@@ -96,7 +95,14 @@ public class GraphDisplayOptions implements OptionsChangeListener {* @param graphType The {@link GraphType} for which to define display options*/public GraphDisplayOptions(GraphType graphType) {- this(graphType, null);+ this.graphType = graphType;+ rootOptionsName = graphType.getOptionsName();+ List<String> edgeTypes = graphType.getEdgeTypes();+ if (!edgeTypes.isEmpty()) {+ favoredEdgeType = edgeTypes.iterator().next();+ }+ initializeEdgePriorities();+ initializeDefaults();}/**@@ -106,15 +112,9 @@ public class GraphDisplayOptions implements OptionsChangeListener {* @param graphType The {@link GraphType} for which to define display options* @param tool the tool from which to initialize from {@link ToolOptions}*/- public GraphDisplayOptions(GraphType graphType, Tool tool) {- this.graphType = graphType;- rootOptionsName = graphType.getOptionsName();- List<String> edgeTypes = graphType.getEdgeTypes();- if (!edgeTypes.isEmpty()) {- favoredEdgeType = edgeTypes.iterator().next();- }- initializeEdgePriorities();- initializeDefaults();+ protected GraphDisplayOptions(GraphType graphType, Tool tool, HelpLocation help) {+ this(graphType);+ registerOptions(tool, help);initializeFromOptions(tool);}@@ -683,11 +683,16 @@ public class GraphDisplayOptions implements OptionsChangeListener {* constructed. Otherwise, if the tool exits and this hasn't been called, any saved option* values will be lost.* <P>- * @param toolOptions the {@link ToolOptions} to register these options with+ * @param tool The tool to use to register options* @param help the help location to be used by the {@link OptionsDialog} for display/editing* these options*/- public void registerOptions(ToolOptions toolOptions, HelpLocation help) {+ protected void registerOptions(Tool tool, HelpLocation help) {+ ToolOptions toolOptions = tool.getOptions("Graph");+ registerOptions(toolOptions, help);+ }++ protected void registerOptions(ToolOptions toolOptions, HelpLocation help) {Options rootOptions = toolOptions.getOptions(graphType.getOptionsName());registerVertexColorOptions(rootOptions, help);registerVertexShapeOptions(rootOptions, help);@@ -695,6 +700,45 @@ public class GraphDisplayOptions implements OptionsChangeListener {registerMiscellaneousOptions(rootOptions, help);}+ /**+ * Pop up a dialog for editing these graph display options. If the options+ * are registered with tool options, show the tool options with the appropriate+ * graph options selected. Otherwise, show an editor for locally editing these+ * options.+ * @param tool the tool+ * @param help the help location to use if the options are edited locally+ */+ public void displayEditor(Tool tool, HelpLocation help) {+ String startingPath = rootOptionsName + ".Vertex Colors";++ // if the options are registered in the tool, just show the+ // corresponding tool options++ if (isRegisteredWithTool()) {+ OptionsService service = tool.getService(OptionsService.class);+ if (service != null) {+ service.showOptionsDialog("Graph." + startingPath, "");+ return;+ }+ }++ // Otherwise, create a new empty options, register the graph options into the+ // those options and use our options editor on those options to allow the+ // user to change these graph display options.++ ToolOptions transientOptions = new ToolOptions("Graph");+ registerOptions(transientOptions, help);+ transientOptions.addOptionsChangeListener(this);+ Options[] optionsArray = new Options[] { transientOptions };+ String dialogTitle = "Graph Instance Settings (Not Saved in Tool Options)";+ OptionsDialog dialog = new OptionsDialog(dialogTitle, "Graph", optionsArray, null);+ // we have one less level for these transient tool options, so no need to prepend "graph."+ dialog.displayCategory(startingPath, "");+ tool.showDialog(dialog);+ dialog.dispose();++ }+/*** Sets default values for vertex types. This method does not allow the vertexType color to* be eligible to be registered as a tool option.@@ -830,9 +874,8 @@ public class GraphDisplayOptions implements OptionsChangeListener {for (String vertexType : graphType.getVertexTypes()) {if (vertexRegistrations.containsKey(vertexType)) {- options.registerThemeColorBinding(vertexType,- vertexRegistrations.get(vertexType), help,- "Choose the color for this vertex type");+ options.registerThemeColorBinding(vertexType, vertexRegistrations.get(vertexType),+ help, "Choose the color for this vertex type");}}List<String> list = new ArrayList<>(graphType.getVertexTypes());@@ -861,9 +904,8 @@ public class GraphDisplayOptions implements OptionsChangeListener {for (String edgeType : graphType.getEdgeTypes()) {if (edgeRegistrations.containsKey(edgeType)) {- options.registerThemeColorBinding(edgeType,- edgeRegistrations.get(edgeType),- help, "Choose the color for this edge type");+ options.registerThemeColorBinding(edgeType, edgeRegistrations.get(edgeType), help,+ "Choose the color for this edge type");}}List<String> list = new ArrayList<>(graphType.getEdgeTypes());@@ -884,29 +926,29 @@ public class GraphDisplayOptions implements OptionsChangeListener {if (defaultRegistrations.containsKey(VERTEX_SELECTION_COLOR)) {optionNamesInDisplayOrder.add(VERTEX_SELECTION_COLOR);options.registerThemeColorBinding(VERTEX_SELECTION_COLOR,- defaultRegistrations.get(VERTEX_SELECTION_COLOR),- help, "Color for highlighting selected vertices");+ defaultRegistrations.get(VERTEX_SELECTION_COLOR), help,+ "Color for highlighting selected vertices");}if (defaultRegistrations.containsKey(EDGE_SELECTION_COLOR)) {optionNamesInDisplayOrder.add(EDGE_SELECTION_COLOR);options.registerThemeColorBinding(EDGE_SELECTION_COLOR,- defaultRegistrations.get(EDGE_SELECTION_COLOR),- help, "Color for highlighting selected edge");+ defaultRegistrations.get(EDGE_SELECTION_COLOR), help,+ "Color for highlighting selected edge");}if (defaultRegistrations.containsKey(DEFAULT_VERTEX_COLOR)) {optionNamesInDisplayOrder.add(DEFAULT_VERTEX_COLOR);options.registerThemeColorBinding(DEFAULT_VERTEX_COLOR,- defaultRegistrations.get(DEFAULT_VERTEX_COLOR),- help, "Color for vertices that have no vertex type defined");+ defaultRegistrations.get(DEFAULT_VERTEX_COLOR), help,+ "Color for vertices that have no vertex type defined");}if (defaultRegistrations.containsKey(DEFAULT_EDGE_COLOR)) {optionNamesInDisplayOrder.add(DEFAULT_EDGE_COLOR);options.registerThemeColorBinding(DEFAULT_EDGE_COLOR,- defaultRegistrations.get(DEFAULT_EDGE_COLOR),- help, "Color for edge that have no edge type defined");+ defaultRegistrations.get(DEFAULT_EDGE_COLOR), help,+ "Color for edge that have no edge type defined");}optionNamesInDisplayOrder.add(DEFAULT_VERTEX_SHAPE);diff --git a/Ghidra/Framework/Graph/src/test/java/ghidra/service/graph/GraphDisplayOptionsTest.java b/Ghidra/Framework/Graph/src/test/java/ghidra/service/graph/GraphDisplayOptionsTest.javaindex ae019bbed5..32b821954e 100644--- a/Ghidra/Framework/Graph/src/test/java/ghidra/service/graph/GraphDisplayOptionsTest.java+++ b/Ghidra/Framework/Graph/src/test/java/ghidra/service/graph/GraphDisplayOptionsTest.java@@ -271,10 +271,10 @@ public class GraphDisplayOptionsTest {Options miscellaneousOptions = graphDisplayOptions.getOptions("Miscellaneous");leafOptionNames = miscellaneousOptions.getLeafOptionNames();- assertEquals(Arrays.asList("Use Icons", "Max Graph Size",- "Selected Vertex Color", "Default Layout Algorithm", "Default Vertex Color",- "Default Vertex Shape", "Selected Edge Color", "Label Position",- "Default Edge Color", "Font", "Favored Edge Type"), leafOptionNames);+ assertEquals(Arrays.asList("Use Icons", "Max Graph Size", "Selected Vertex Color",+ "Default Layout Algorithm", "Default Vertex Color", "Default Vertex Shape",+ "Selected Edge Color", "Label Position", "Default Edge Color", "Font",+ "Favored Edge Type"), leafOptionNames);}@@ -318,4 +318,5 @@ public class GraphDisplayOptionsTest {}}+}diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.javaindex 6d80ce3c62..f43c8f65cd 100644--- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.java+++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.java@@ -37,6 +37,7 @@ import docking.actions.PopupActionProvider;import docking.actions.ToolActions;import docking.framework.AboutDialog;import docking.framework.ApplicationInformationDisplayFactory;+import docking.options.OptionsService;import docking.tool.ToolConstants;import docking.tool.util.DockingToolConstants;import docking.util.image.ToolIconURL;diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/mgr/OptionsManager.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/mgr/OptionsManager.javaindex b813290776..2ddef1377a 100644--- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/mgr/OptionsManager.java+++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/mgr/OptionsManager.java@@ -23,6 +23,7 @@ import javax.swing.tree.TreePath;import org.jdom.Element;+import docking.options.OptionsService;import docking.options.editor.OptionsDialog;import docking.tool.ToolConstants;import docking.tool.util.DockingToolConstants;@@ -30,7 +31,6 @@ import ghidra.framework.options.*;import ghidra.framework.plugintool.Plugin;import ghidra.framework.plugintool.PluginTool;import ghidra.framework.plugintool.dialog.KeyBindingsPanel;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.util.HelpLocation;import ghidra.util.Msg;import ghidra.util.exception.AssertException;diff --git a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/BlockModelScreenShots.java b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/BlockModelScreenShots.javaindex ee94db8add..4284c8a5d3 100644--- a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/BlockModelScreenShots.java+++ b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/BlockModelScreenShots.java@@ -21,6 +21,7 @@ import java.util.List;import org.junit.Test;+import docking.options.OptionsService;import ghidra.GhidraOptions;import ghidra.app.plugin.core.codebrowser.CodeBrowserPlugin;import ghidra.app.plugin.core.colorizer.ColorizingService;@@ -33,7 +34,6 @@ import ghidra.app.util.viewer.listingpanel.ListingPanel;import ghidra.app.util.viewer.listingpanel.MarginProvider;import ghidra.framework.options.Options;import ghidra.framework.options.ToolOptions;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.program.model.address.Address;import ghidra.program.model.address.AddressSet;import ghidra.program.model.block.*;diff --git a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/ToolScreenShots.java b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/ToolScreenShots.javaindex 64c042d919..1165e9de6c 100644--- a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/ToolScreenShots.java+++ b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/ToolScreenShots.java@@ -32,6 +32,7 @@ import docking.StatusBar;import docking.action.DockingActionIf;import docking.actions.KeyEntryDialog;import docking.actions.ToolActions;+import docking.options.OptionsService;import docking.tool.ToolConstants;import docking.widgets.OptionDialog;import docking.widgets.table.GTable;@@ -44,7 +45,6 @@ import ghidra.framework.cmd.BackgroundCommand;import ghidra.framework.main.PickToolDialog;import ghidra.framework.model.DomainObject;import ghidra.framework.plugintool.dialog.PluginInstallerDialog;-import ghidra.framework.plugintool.util.OptionsService;import ghidra.test.TestEnv;import ghidra.util.task.TaskDialog;import ghidra.util.task.TaskMonitor;