mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-1545: De-guava the Debugger
This commit is contained in:
parent
a2ae1f08ce
commit
d43b9ead66
142 changed files with 1125 additions and 1889 deletions
|
@ -25,8 +25,6 @@ import java.util.function.Function;
|
|||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
|
||||
import docking.widgets.table.*;
|
||||
import docking.widgets.table.DefaultEnumeratedColumnTableModel.EnumeratedTableColumn;
|
||||
import ghidra.docking.settings.Settings;
|
||||
|
@ -239,8 +237,8 @@ public class DebuggerSnapshotTablePanel extends JPanel {
|
|||
Collection<? extends TraceSnapshot> snapshots = hideScratch
|
||||
? manager.getSnapshots(0, true, Long.MAX_VALUE, true)
|
||||
: manager.getAllSnapshots();
|
||||
snapshotTableModel.addAll(Collections2.transform(snapshots,
|
||||
s -> new SnapshotRow(currentTrace, s)));
|
||||
snapshotTableModel
|
||||
.addAll(snapshots.stream().map(s -> new SnapshotRow(currentTrace, s)).toList());
|
||||
}
|
||||
|
||||
protected void deleteScratchSnapshots() {
|
||||
|
@ -252,9 +250,10 @@ public class DebuggerSnapshotTablePanel extends JPanel {
|
|||
return;
|
||||
}
|
||||
TraceTimeManager manager = currentTrace.getTimeManager();
|
||||
snapshotTableModel.addAll(Collections2.transform(
|
||||
manager.getSnapshots(Long.MIN_VALUE, true, 0, false),
|
||||
s -> new SnapshotRow(currentTrace, s)));
|
||||
snapshotTableModel.addAll(manager.getSnapshots(Long.MIN_VALUE, true, 0, false)
|
||||
.stream()
|
||||
.map(s -> new SnapshotRow(currentTrace, s))
|
||||
.toList());
|
||||
}
|
||||
|
||||
public ListSelectionModel getSelectionModel() {
|
||||
|
|
|
@ -112,7 +112,7 @@ public class LoneLogicalBreakpoint implements LogicalBreakpointInternal {
|
|||
|
||||
@Override
|
||||
public Set<TraceBreakpoint> getTraceBreakpoints() {
|
||||
return new HashSet<>(breaks.getBreakpoints());
|
||||
return breaks.getBreakpoints();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -334,7 +334,7 @@ public class MappedLogicalBreakpoint implements LogicalBreakpointInternal {
|
|||
synchronized (traceBreaks) {
|
||||
breaks = traceBreaks.get(trace);
|
||||
}
|
||||
return breaks == null ? Set.of() : new HashSet<>(breaks.getBreakpoints());
|
||||
return breaks == null ? Set.of() : breaks.getBreakpoints();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
package ghidra.app.plugin.core.debug.service.breakpoint;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import ghidra.app.services.*;
|
||||
import ghidra.app.services.LogicalBreakpoint.TraceMode;
|
||||
|
@ -239,8 +238,8 @@ class TraceBreakpointSet {
|
|||
*
|
||||
* @return the breakpoints
|
||||
*/
|
||||
public Collection<TraceBreakpoint> getBreakpoints() {
|
||||
return Collections2.transform(breakpoints, e -> e.obj);
|
||||
public Set<TraceBreakpoint> getBreakpoints() {
|
||||
return breakpoints.stream().map(e -> e.obj).collect(Collectors.toUnmodifiableSet());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue