Merge remote-tracking branch 'origin/GP-5675_Dan_fixCompareSnapshots' into Ghidra_11.4

This commit is contained in:
Ryan Kurtz 2025-05-14 16:14:39 -04:00
commit fa09e132a1
3 changed files with 24 additions and 1 deletions

View file

@ -51,6 +51,11 @@ public interface DebuggerTraceManagerService {
* TODO: Distinguish between API and GUI? * TODO: Distinguish between API and GUI?
*/ */
USER, USER,
/**
* The request was driven by the user, but its some alternative view, e.g., to compare
* snapshots
*/
USER_ALT,
/** /**
* A trace was activated because a target was published or withdrawn * A trace was activated because a target was published or withdrawn
*/ */

View file

@ -16,6 +16,7 @@
package ghidra.app.plugin.core.debug.gui.time; package ghidra.app.plugin.core.debug.gui.time;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.event.*;
import java.util.function.Function; import java.util.function.Function;
import javax.swing.*; import javax.swing.*;
@ -106,6 +107,23 @@ public class DebuggerTimeSelectionDialog extends DialogComponentProvider {
} }
scheduleText.setText(radix.format(snap)); scheduleText.setText(radix.format(snap));
}); });
snapshotPanel.snapshotTable.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
close();
}
}
});
snapshotPanel.snapshotTable.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
close();
e.consume(); // lest it select the next row down
}
}
});
scheduleText.getDocument().addDocumentListener(new DocumentListener() { scheduleText.getDocument().addDocumentListener(new DocumentListener() {
@Override @Override

View file

@ -725,7 +725,7 @@ public class DebuggerTraceManagerServicePlugin extends Plugin
@Override @Override
public CompletableFuture<Long> materialize(DebuggerCoordinates coordinates) { public CompletableFuture<Long> materialize(DebuggerCoordinates coordinates) {
return materialize(DebuggerCoordinates.NOWHERE, coordinates, ActivationCause.USER); return materialize(DebuggerCoordinates.NOWHERE, coordinates, ActivationCause.USER_ALT);
} }
protected CompletableFuture<Long> materialize(DebuggerCoordinates previous, protected CompletableFuture<Long> materialize(DebuggerCoordinates previous,