mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 22:55:33 +08:00
GP-1071 - Fixed decompiler hover to prevent the Data Type hover from
appearing when over a scalar Closes #1071
This commit is contained in:
+2
@@ -37,6 +37,8 @@ public class DataTypeDecompilerHover extends AbstractConfigurableHover
|
|||||||
private static final String NAME = "Data Type Display";
|
private static final String NAME = "Data Type Display";
|
||||||
private static final String DESCRIPTION =
|
private static final String DESCRIPTION =
|
||||||
"Show data type contents when hovering over a type name.";
|
"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;
|
private static final int PRIORITY = 20;
|
||||||
|
|
||||||
protected DataTypeDecompilerHover(PluginTool tool) {
|
protected DataTypeDecompilerHover(PluginTool tool) {
|
||||||
|
|||||||
+2
@@ -47,6 +47,8 @@ public class FunctionSignatureDecompilerHover extends AbstractConfigurableHover
|
|||||||
private static final String NAME = "Function Signature Display";
|
private static final String NAME = "Function Signature Display";
|
||||||
private static final String DESCRIPTION =
|
private static final String DESCRIPTION =
|
||||||
"Show function signatures when hovering over a function name.";
|
"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;
|
private static final int PRIORITY = 20;
|
||||||
|
|
||||||
protected FunctionSignatureDecompilerHover(PluginTool tool) {
|
protected FunctionSignatureDecompilerHover(PluginTool tool) {
|
||||||
|
|||||||
+5
-1
@@ -34,7 +34,11 @@ public class ReferenceDecompilerHover extends AbstractReferenceHover
|
|||||||
private static final String DESCRIPTION =
|
private static final String DESCRIPTION =
|
||||||
"Shows \"referred to\" code and data from the decompiler.";
|
"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) {
|
public ReferenceDecompilerHover(PluginTool tool) {
|
||||||
super(tool, PRIORITY);
|
super(tool, PRIORITY);
|
||||||
|
|||||||
+8
-1
@@ -36,7 +36,14 @@ import ghidra.program.util.ProgramLocation;
|
|||||||
public class ScalarValueDecompilerHover extends AbstractScalarOperandHover
|
public class ScalarValueDecompilerHover extends AbstractScalarOperandHover
|
||||||
implements DecompilerHoverService {
|
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 NAME = "Scalar Operand Display";
|
||||||
private static final String DESCRIPTION =
|
private static final String DESCRIPTION =
|
||||||
|
|||||||
Reference in New Issue
Block a user