mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Merge remote-tracking branch 'origin/GP-3469_Dan_modulePcLabelsCollide' into patch
This commit is contained in:
commit
4fbb7bf45a
3 changed files with 23 additions and 12 deletions
|
@ -199,5 +199,6 @@ public class DebuggerLocationLabel extends JLabel {
|
||||||
public void updateLabel() {
|
public void updateLabel() {
|
||||||
String label = computeLocationString();
|
String label = computeLocationString();
|
||||||
setText(label);
|
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 static ghidra.app.plugin.core.debug.gui.DebuggerResources.ICON_REGISTER_MARKER;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
import java.awt.event.MouseAdapter;
|
import java.awt.event.MouseAdapter;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.lang.invoke.MethodHandles;
|
import java.lang.invoke.MethodHandles;
|
||||||
|
@ -26,8 +26,8 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import javax.swing.Box;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
|
@ -208,6 +208,7 @@ public class DebuggerListingProvider extends CodeViewerProvider {
|
||||||
protected void specChanged(LocationTrackingSpec spec) {
|
protected void specChanged(LocationTrackingSpec spec) {
|
||||||
updateTitle();
|
updateTitle();
|
||||||
trackingLabel.setText("");
|
trackingLabel.setText("");
|
||||||
|
trackingLabel.setToolTipText("");
|
||||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||||
trackingSpecChangeListeners.fire.locationTrackingSpecChanged(spec);
|
trackingSpecChangeListeners.fire.locationTrackingSpecChanged(spec);
|
||||||
}
|
}
|
||||||
|
@ -333,9 +334,11 @@ public class DebuggerListingProvider extends CodeViewerProvider {
|
||||||
|
|
||||||
addDisplayListener(readsMemTrait.getDisplayListener());
|
addDisplayListener(readsMemTrait.getDisplayListener());
|
||||||
|
|
||||||
JPanel northPanel = new JPanel(new BorderLayout());
|
Box northPanel = Box.createHorizontalBox();
|
||||||
northPanel.add(locationLabel, BorderLayout.WEST);
|
northPanel.add(locationLabel);
|
||||||
northPanel.add(trackingLabel, BorderLayout.EAST);
|
locationLabel.setMinimumSize(new Dimension(0, 0));
|
||||||
|
northPanel.add(Box.createGlue());
|
||||||
|
northPanel.add(trackingLabel);
|
||||||
this.setNorthComponent(northPanel);
|
this.setNorthComponent(northPanel);
|
||||||
if (isConnected) {
|
if (isConnected) {
|
||||||
setTitle(DebuggerResources.TITLE_PROVIDER_LISTING);
|
setTitle(DebuggerResources.TITLE_PROVIDER_LISTING);
|
||||||
|
@ -1051,7 +1054,9 @@ public class DebuggerListingProvider extends CodeViewerProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void goToAndUpdateTrackingLabel(TraceProgramView curView, ProgramLocation loc) {
|
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)) {
|
if (goTo(curView, loc)) {
|
||||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,14 +16,14 @@
|
||||||
package ghidra.app.plugin.core.debug.gui.memory;
|
package ghidra.app.plugin.core.debug.gui.memory;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Dimension;
|
||||||
import java.awt.event.MouseAdapter;
|
import java.awt.event.MouseAdapter;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.lang.invoke.MethodHandles;
|
import java.lang.invoke.MethodHandles;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import javax.swing.JLabel;
|
import javax.swing.*;
|
||||||
import javax.swing.JPanel;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
@ -133,6 +133,7 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
|
||||||
protected void specChanged(LocationTrackingSpec spec) {
|
protected void specChanged(LocationTrackingSpec spec) {
|
||||||
updateTitle();
|
updateTitle();
|
||||||
trackingLabel.setText("");
|
trackingLabel.setText("");
|
||||||
|
trackingLabel.setToolTipText("");
|
||||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,9 +207,11 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
|
||||||
createActions();
|
createActions();
|
||||||
addDisplayListener(readsMemTrait.getDisplayListener());
|
addDisplayListener(readsMemTrait.getDisplayListener());
|
||||||
|
|
||||||
JPanel northPanel = new JPanel(new BorderLayout());
|
Box northPanel = Box.createHorizontalBox();
|
||||||
northPanel.add(locationLabel, BorderLayout.WEST);
|
northPanel.add(locationLabel);
|
||||||
northPanel.add(trackingLabel, BorderLayout.EAST);
|
locationLabel.setMinimumSize(new Dimension(0, 0));
|
||||||
|
northPanel.add(Box.createGlue());
|
||||||
|
northPanel.add(trackingLabel);
|
||||||
decorationComponent.add(northPanel, BorderLayout.NORTH);
|
decorationComponent.add(northPanel, BorderLayout.NORTH);
|
||||||
|
|
||||||
goToTrait.goToCoordinates(current);
|
goToTrait.goToCoordinates(current);
|
||||||
|
@ -474,7 +477,9 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void goToAndUpdateTrackingLabel(TraceProgramView curView, ProgramLocation loc) {
|
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)) {
|
if (goTo(curView, loc)) {
|
||||||
trackingLabel.setForeground(Colors.FOREGROUND);
|
trackingLabel.setForeground(Colors.FOREGROUND);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue