This commit is contained in:
Greg DiCristofaro 2021-09-08 14:19:52 -04:00
parent 5170c03bcb
commit 7adfcf4b17
2 changed files with 26 additions and 11 deletions

View File

@ -117,12 +117,13 @@ public class InterestingHits implements AutopsyVisitableItem {
Map<String, Set<Long>> setMapping = interestingItemsMap.getOrDefault(type, Collections.emptyMap());
setNames = new ArrayList<>(setMapping.keySet());
}
Collections.sort(setNames);
Collections.sort(setNames, (a, b) -> a.compareToIgnoreCase(b));
return setNames;
}
/**
* Returns all types currently in the map.
*
* @return The types present in the map.
*/
List<BlackboardArtifact.Type> getTypes() {
@ -287,6 +288,17 @@ public class InterestingHits implements AutopsyVisitableItem {
return new SetNameNode(this.type, key);
}
@Override
protected void addNotify() {
interestingResults.update();
interestingResults.addObserver(this);
}
@Override
protected void finalize() throws Throwable {
interestingResults.deleteObserver(this);
}
@Override
public void update(Observable o, Object arg) {
refresh(true);
@ -318,7 +330,7 @@ public class InterestingHits implements AutopsyVisitableItem {
@Override
public boolean isLeafTypeNode() {
return false;
return true;
}
@Override

View File

@ -1446,8 +1446,11 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
}
// make sure data is fully loaded
setNodeChildren.getNodes(true);
return interestingItemsRootChildren.findChild(setName);
final String finalSetName = setName;
return Stream.of(setNodeChildren.getNodes(true))
.filter(setNode -> finalSetName.equals(setNode.getLookup().lookup(String.class)))
.findFirst()
.orElse(null);
}
/**