mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 23:17:03 +08:00
GP-6640 - Updated Xrefs field to display a plus sign when there are more
than the max xrefs to display
This commit is contained in:
@@ -253,14 +253,17 @@
|
|||||||
</TR>
|
</TR>
|
||||||
|
|
||||||
<TR>
|
<TR>
|
||||||
<A NAME="Keyboard_Controls_Shift">
|
|
||||||
<TD width="21%" valign="top"><Shift></TD>
|
<TD width="21%" valign="top">
|
||||||
|
<A NAME="Keyboard_Controls_Shift" />
|
||||||
|
<Shift>
|
||||||
|
</TD>
|
||||||
|
|
||||||
<TD width="79%">Press shift when using the mouse scroll wheel to perform
|
<TD width="79%">Press shift when using the mouse scroll wheel to perform
|
||||||
horizontal scrolling. This will only work when the horizontal scroll
|
horizontal scrolling. This will only work when the horizontal scroll
|
||||||
bar is visible.
|
bar is visible.
|
||||||
|
|
||||||
<BLOCKQUOTE>
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
<IMG border="0" src="help/shared/note.png" alt="">
|
<IMG border="0" src="help/shared/note.png" alt="">
|
||||||
|
|||||||
+17
-10
@@ -127,7 +127,7 @@ public class XRefHeaderFieldFactory extends XRefFieldFactory {
|
|||||||
* <br>
|
* <br>
|
||||||
* Where:<br>
|
* Where:<br>
|
||||||
* m is the number of cross references <br>
|
* m is the number of cross references <br>
|
||||||
* n is the number of off-cut cross references <br><br>
|
* n is the number of offcut cross references <br><br>
|
||||||
*/
|
*/
|
||||||
private String getXRefHeaderString(CodeUnit cu) {
|
private String getXRefHeaderString(CodeUnit cu) {
|
||||||
if (cu == null) {
|
if (cu == null) {
|
||||||
@@ -135,20 +135,27 @@ public class XRefHeaderFieldFactory extends XRefFieldFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Reference> xrefs = XReferenceUtils.getXReferences(cu, maxXRefs);
|
List<Reference> xrefs = XReferenceUtils.getXReferences(cu, maxXRefs);
|
||||||
int xrefCount = xrefs.size();
|
int xRefCount = xrefs.size();
|
||||||
|
|
||||||
|
String xRefCountText = Integer.toString(xRefCount);
|
||||||
|
if (xRefCount == maxXRefs) {
|
||||||
|
xRefCountText += "+";
|
||||||
|
}
|
||||||
|
|
||||||
List<Reference> offcuts = XReferenceUtils.getOffcutXReferences(cu, maxXRefs);
|
List<Reference> offcuts = XReferenceUtils.getOffcutXReferences(cu, maxXRefs);
|
||||||
int offcutCount = offcuts.size();
|
int offcutCount = offcuts.size();
|
||||||
|
|
||||||
if (offcutCount > 0) {
|
String offcutCountText = Integer.toString(offcutCount);
|
||||||
String modifier = "";
|
if (offcutCount == maxXRefs) {
|
||||||
if (offcutCount == maxXRefs) {
|
offcutCountText += "+";
|
||||||
modifier = "+";
|
|
||||||
}
|
|
||||||
return "XREF[" + xrefCount + "," + offcutCount + modifier + "]: ";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xrefCount > 0) {
|
if (offcutCount > 0) {
|
||||||
return "XREF[" + xrefCount + "]: ";
|
return "XREF[" + xRefCountText + "," + offcutCountText + "]: ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xRefCount > 0) {
|
||||||
|
return "XREF[" + xRefCountText + "]: ";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user