mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch 'origin/GP-3469_Dan_modulePcLabelsCollide' into patch
This commit is contained in:
@@ -199,5 +199,6 @@ public class DebuggerLocationLabel extends JLabel {
|
||||
public void updateLabel() {
|
||||
String label = computeLocationString();
|
||||
setText(label);
|
||||
setToolTipText(label);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ghidra.app.plugin.core.debug.gui.listing;
|
||||
|
||||
import static ghidra.app.plugin.core.debug.gui.DebuggerResources.ICON_REGISTER_MARKER;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
@@ -26,8 +26,8 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.swing.Box;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
@@ -208,6 +208,7 @@ public class DebuggerListingProvider extends CodeViewerProvider {
|
||||
protected void specChanged(LocationTrackingSpec spec) {
|
||||
updateTitle();
|
||||
trackingLabel.setText("");
|
||||
trackingLabel.setToolTipText("");
|
||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||
trackingSpecChangeListeners.fire.locationTrackingSpecChanged(spec);
|
||||
}
|
||||
@@ -333,9 +334,11 @@ public class DebuggerListingProvider extends CodeViewerProvider {
|
||||
|
||||
addDisplayListener(readsMemTrait.getDisplayListener());
|
||||
|
||||
JPanel northPanel = new JPanel(new BorderLayout());
|
||||
northPanel.add(locationLabel, BorderLayout.WEST);
|
||||
northPanel.add(trackingLabel, BorderLayout.EAST);
|
||||
Box northPanel = Box.createHorizontalBox();
|
||||
northPanel.add(locationLabel);
|
||||
locationLabel.setMinimumSize(new Dimension(0, 0));
|
||||
northPanel.add(Box.createGlue());
|
||||
northPanel.add(trackingLabel);
|
||||
this.setNorthComponent(northPanel);
|
||||
if (isConnected) {
|
||||
setTitle(DebuggerResources.TITLE_PROVIDER_LISTING);
|
||||
@@ -1051,7 +1054,9 @@ public class DebuggerListingProvider extends CodeViewerProvider {
|
||||
}
|
||||
|
||||
protected void goToAndUpdateTrackingLabel(TraceProgramView curView, ProgramLocation loc) {
|
||||
trackingLabel.setText(trackingTrait.computeLabelText());
|
||||
String labelText = trackingTrait.computeLabelText();
|
||||
trackingLabel.setText(labelText);
|
||||
trackingLabel.setToolTipText(labelText);
|
||||
if (goTo(curView, loc)) {
|
||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
package ghidra.app.plugin.core.debug.gui.memory;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.*;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -133,6 +133,7 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
|
||||
protected void specChanged(LocationTrackingSpec spec) {
|
||||
updateTitle();
|
||||
trackingLabel.setText("");
|
||||
trackingLabel.setToolTipText("");
|
||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||
}
|
||||
}
|
||||
@@ -206,9 +207,11 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
|
||||
createActions();
|
||||
addDisplayListener(readsMemTrait.getDisplayListener());
|
||||
|
||||
JPanel northPanel = new JPanel(new BorderLayout());
|
||||
northPanel.add(locationLabel, BorderLayout.WEST);
|
||||
northPanel.add(trackingLabel, BorderLayout.EAST);
|
||||
Box northPanel = Box.createHorizontalBox();
|
||||
northPanel.add(locationLabel);
|
||||
locationLabel.setMinimumSize(new Dimension(0, 0));
|
||||
northPanel.add(Box.createGlue());
|
||||
northPanel.add(trackingLabel);
|
||||
decorationComponent.add(northPanel, BorderLayout.NORTH);
|
||||
|
||||
goToTrait.goToCoordinates(current);
|
||||
@@ -474,7 +477,9 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
|
||||
}
|
||||
|
||||
protected void goToAndUpdateTrackingLabel(TraceProgramView curView, ProgramLocation loc) {
|
||||
trackingLabel.setText(trackingTrait.computeLabelText());
|
||||
String labelText = trackingTrait.computeLabelText();
|
||||
trackingLabel.setText(labelText);
|
||||
trackingLabel.setToolTipText(labelText);
|
||||
if (goTo(curView, loc)) {
|
||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user