GP-1382 - Added Find actions to the Data Types provider to allow users

to find structures by size or by offset(s).
This commit is contained in:
dragonmacher 2021-10-20 16:54:04 -04:00
parent f9463e600d
commit ec88c732d2
19 changed files with 1104 additions and 379 deletions

View file

@ -29,10 +29,10 @@ public class ClassSearchTask extends Task {
}
@Override
public void run(final TaskMonitor taskMonitor) {
public void run(final TaskMonitor monitor) {
try {
ClassSearcher.search(true, taskMonitor);
ClassSearcher.search(true, monitor);
}
catch (CancelledException e) {
// user cancelled

View file

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -30,7 +29,7 @@ public class SortedRangeList implements Iterable<Range> {
* Creates a new empty sorted range list.
*/
public SortedRangeList() {
set = new TreeSet<Range>();
set = new TreeSet<>();
}
/**
@ -39,7 +38,7 @@ public class SortedRangeList implements Iterable<Range> {
* @param list the sorted range list to make an equivalent copy of.
*/
public SortedRangeList(SortedRangeList list) {
set = new TreeSet<Range>();
set = new TreeSet<>();
Iterator<Range> it = list.set.iterator();
while (it.hasNext()) {
Range r = it.next();
@ -98,7 +97,7 @@ public class SortedRangeList implements Iterable<Range> {
return set.iterator();
}
Iterator<Range> it = set.iterator();
LinkedList<Range> ll = new LinkedList<Range>();
LinkedList<Range> ll = new LinkedList<>();
while (it.hasNext()) {
ll.addFirst(it.next());
}
@ -362,4 +361,8 @@ public class SortedRangeList implements Iterable<Range> {
public Iterator<Range> iterator() {
return getRanges(true);
}
public void clear() {
set.clear();
}
}