mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Test fixes
This commit is contained in:
parent
cc1228bdaa
commit
b04ff770b3
6 changed files with 24 additions and 14 deletions
|
@ -188,7 +188,9 @@ public class ProjectDataTreePanel extends JPanel {
|
|||
}
|
||||
|
||||
public void selectDomainFile(DomainFile domainFile) {
|
||||
selectDomainFiles(Set.of(domainFile));
|
||||
if (domainFile != null) {
|
||||
selectDomainFiles(Set.of(domainFile));
|
||||
}
|
||||
}
|
||||
|
||||
public void setHelpLocation(HelpLocation helpLocation) {
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -22,6 +22,7 @@ import javax.swing.tree.TreePath;
|
|||
|
||||
import docking.action.MenuData;
|
||||
import docking.widgets.tree.GTreeNode;
|
||||
import docking.widgets.tree.tasks.GTreeExpandAllTask;
|
||||
import ghidra.framework.main.datatable.ProjectTreeAction;
|
||||
import ghidra.framework.main.datatree.DataTree;
|
||||
import ghidra.framework.main.datatree.FrontEndProjectTreeContext;
|
||||
|
@ -53,8 +54,16 @@ public class ProjectDataSelectAction extends ProjectTreeAction {
|
|||
*/
|
||||
private void selectAllChildren(DataTree tree, GTreeNode node) {
|
||||
List<TreePath> paths = new ArrayList<TreePath>();
|
||||
getAllTreePaths(node, paths);
|
||||
tree.setSelectionPaths(paths.toArray(new TreePath[paths.size()]));
|
||||
|
||||
tree.runTask(monitor -> {
|
||||
|
||||
GTreeExpandAllTask task = new GTreeExpandAllTask(tree, node);
|
||||
task.run(monitor);
|
||||
|
||||
getAllTreePaths(node, paths);
|
||||
tree.setSelectionPaths(paths);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue