GP-4261 - Version Tracking - Fixed 'Unregistered Option' tooltip

This commit is contained in:
dragonmacher 2024-08-05 19:00:10 -04:00
parent 4737bbfc5d
commit ed8f22d47c
2 changed files with 26 additions and 6 deletions

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -17,7 +17,7 @@ package ghidra.feature.vt.api.util;
import org.jdom.Element;
import ghidra.framework.options.ToolOptions;
import ghidra.framework.options.*;
public class VTOptions extends ToolOptions {
@ -42,4 +42,18 @@ public class VTOptions extends ToolOptions {
public boolean validate() {
return true;
}
@Override
public String getDescription(String optionName) {
Option option = getOption(optionName, OptionType.NO_TYPE, null);
String description = option.getDescription();
// Correlator factories may create an options object and set values without ever having
// registered the option. Ideally we would update the VTOptions usage to make sure the
// options are all registered. This check here is an easier fix.
if (description.equals(Option.UNREGISTERED_OPTION)) {
return option.getName();
}
return description;
}
}