Merge remote-tracking branch 'origin/GP-1071-dragonmacher-decompiler-scalar-hover'

This commit is contained in:
ghidra1
2021-06-25 14:43:33 -04:00
4 changed files with 17 additions and 2 deletions
@@ -37,6 +37,8 @@ public class DataTypeDecompilerHover extends AbstractConfigurableHover
private static final String NAME = "Data Type Display";
private static final String DESCRIPTION =
"Show data type contents when hovering over a type name.";
// note: this is relative to other DecompilerHovers; a higher priority gets called first
private static final int PRIORITY = 20;
protected DataTypeDecompilerHover(PluginTool tool) {
@@ -47,6 +47,8 @@ public class FunctionSignatureDecompilerHover extends AbstractConfigurableHover
private static final String NAME = "Function Signature Display";
private static final String DESCRIPTION =
"Show function signatures when hovering over a function name.";
// note: this is relative to other DecompilerHovers; a higher priority gets called first
private static final int PRIORITY = 20;
protected FunctionSignatureDecompilerHover(PluginTool tool) {
@@ -34,7 +34,11 @@ public class ReferenceDecompilerHover extends AbstractReferenceHover
private static final String DESCRIPTION =
"Shows \"referred to\" code and data from the decompiler.";
private static final int PRIORITY = 25;
// note: this is relative to other DecompilerHovers; a higher priority gets called first
// Use high value so this hover gets called first. The method for determining what the user
// is hovering in the Decompiler is less then perfect. We choose to allow the more precise
// hovers get a chance to process the request first.
private static final int PRIORITY = 50;
public ReferenceDecompilerHover(PluginTool tool) {
super(tool, PRIORITY);
@@ -36,7 +36,14 @@ import ghidra.program.util.ProgramLocation;
public class ScalarValueDecompilerHover extends AbstractScalarOperandHover
implements DecompilerHoverService {
private static final int PRIORITY = 20;
// note: this is relative to other DecompilerHovers; a higher priority gets called first
// Use high value so this hover gets called first. The method for determining what the user
// is hovering in the Decompiler is less then perfect. We choose to allow the more precise
// hovers to get a chance to process the request first.
// We want this hover to go before the data type hovers, due to how that hover decides when it
// can show a popup, it decides to work when over a scalar. Having this hover get called
// first prevents that.
private static final int PRIORITY = 30;
private static final String NAME = "Scalar Operand Display";
private static final String DESCRIPTION =