mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 01:39:21 +02:00
Test fixes for missing options help
This commit is contained in:
parent
3c86a0f3aa
commit
abca848c4a
3 changed files with 8 additions and 6 deletions
|
@ -322,7 +322,6 @@ public class SourceFilesTablePlugin extends ProgramPlugin implements OptionsChan
|
|||
|
||||
}
|
||||
|
||||
|
||||
private void initOptions(ToolOptions options) {
|
||||
options.registerOption(USE_EXISTING_AS_DEFAULT_OPTION_NAME, true,
|
||||
new HelpLocation(getName(), "Use_Existing_As_Default"),
|
||||
|
@ -336,8 +335,8 @@ public class SourceFilesTablePlugin extends ProgramPlugin implements OptionsChan
|
|||
() -> new StringWithChoicesEditor(VIEWERS));
|
||||
selectedViewer = options.getString(SELECTED_VIEWER_OPTION_NAME, VS_CODE);
|
||||
options.addOptionsChangeListener(this);
|
||||
|
||||
options.setOptionsHelpLocation(
|
||||
new HelpLocation(getName(), "Source_Files_Table_Plugin_Options"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -243,6 +243,7 @@ public class SourceMapFieldFactory extends FieldFactory {
|
|||
"Show source file identifier info");
|
||||
showIdentifier = fieldOptions.getBoolean(SHOW_IDENTIFIER_OPTION_NAME, false);
|
||||
|
||||
fieldOptions.getOptions(GROUP_TITLE).setOptionsHelpLocation(helpLoc);
|
||||
}
|
||||
|
||||
private List<SourceMapEntry> getSourceMapEntries(CodeUnit cu) {
|
||||
|
|
|
@ -1007,13 +1007,15 @@ public class CodeBrowserOptionsTest extends AbstractGhidraHeadedIntegrationTest
|
|||
List<HelpLocation> nestedHelp = getParentHelpLocations(options, name);
|
||||
for (HelpLocation help : nestedHelp) {
|
||||
if (help != null && !isValidHelpLocation(help)) {
|
||||
missing.add("Bad help location: " + help.toString());
|
||||
missing.add("Bad parent help for path: " + options.getName() + "." + name +
|
||||
"; help: " + help.toString() + "\nMake sure your options parent node " +
|
||||
"has a help location set, in addition to the individual options " +
|
||||
"node");
|
||||
}
|
||||
}
|
||||
|
||||
// it has a help location; is it valid?
|
||||
if (hl != null && !isValidHelpLocation(hl)) {
|
||||
isValidHelpLocation(hl);
|
||||
missing.add(options.getName() + "." + name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue