GP-4309 - Updated Options API to defer Swing PropertyEditor construction

This commit is contained in:
dragonmacher 2024-03-12 15:19:15 -04:00
parent 50df70ba0f
commit cabeaf3c1b
29 changed files with 317 additions and 316 deletions

View file

@ -363,7 +363,7 @@ public class ProgramCompilerSpec extends BasicCompilerSpec {
OptionType.STRING_TYPE, evalChoices[0],
new HelpLocation("DecompilePlugin", "OptionProtoEval"),
"Select the default function prototype/evaluation model to be used during Decompiler analysis",
new StringWithChoicesEditor(evalChoices));
() -> new StringWithChoicesEditor(evalChoices));
// TODO: registration of DECOMPILER_OUTPUT_LANGUAGE option should be tied to Processor
// and not presence of stored option.

View file

@ -36,7 +36,7 @@ import ghidra.xml.*;
* Utility class for installing/removing "specification extensions" to a Program.
* A specification extension is a program specific version of either a:
* - Prototype Model
* - Call Fixup or
* - Call Fixup or
* - Callother Fixup
* Normally these objects are provided by the language specific configuration files (.cspec or .pspec),
* but this class allows additional objects to be added that are specific to the program.
@ -48,7 +48,7 @@ import ghidra.xml.*;
* - \<callotherfixup> - describing a Callother Fixup
* - \<prototype> - describing a typical Prototype Model
* - \<resolveprototype> - describing a Prototype Model merged from other models
*
*
* Each type of object has a unique name or target, which must be specified as part of the XML tag,
* which is referred to in this class as the extension's "formal name". In the \<callotherfixup> tag,
* the formal name is given by the "targetop" attribute; for all the other tags, the formal name is
@ -332,7 +332,7 @@ public class SpecExtension {
if (!SystemUtilities.isInHeadlessMode()) {
Options options = program.getOptions(SPEC_EXTENSION);
options.setOptionsHelpLocation(new HelpLocation("DecompilePlugin", "ExtensionOptions"));
options.registerOptionsEditor(new SpecExtensionEditor((ProgramDB) program));
options.registerOptionsEditor(() -> new SpecExtensionEditor((ProgramDB) program));
}
}