mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
changs from review
This commit is contained in:
parent
7cfa80f8ac
commit
4cab252ff5
2 changed files with 9 additions and 9 deletions
|
@ -39,7 +39,7 @@ public abstract class GTreeLazyNode extends GTreeNode {
|
|||
* Sets this lazy node back to the "unloaded" state such that if
|
||||
* its children are accessed, it will reload its children as needed.
|
||||
* NOTE: This method does not trigger a call to {@link #fireNodeChanged(GTreeNode, GTreeNode)}
|
||||
* because doing will often trigger a call from the JTree will will immediately cause the node
|
||||
* because doing so may trigger a call from the JTree that will immediately cause the node
|
||||
* to reload its children. If that is the effect you want, call {@link #reload()}.
|
||||
*/
|
||||
public void unloadChildren() {
|
||||
|
@ -50,9 +50,9 @@ public abstract class GTreeLazyNode extends GTreeNode {
|
|||
|
||||
/**
|
||||
* Tells this node that its children are stale and that it needs to regenerate them. This will
|
||||
* unload any existing children and call {@link #fireNodeStructureChanged(GTreeNode)} which will
|
||||
* inform the JTree that this node has changed and when the JTree queries this node for its children,
|
||||
* the {@link #generateChildren()} will get called to populate the node.
|
||||
* unload any existing children and call {@link #fireNodeStructureChanged(GTreeNode)}, which will
|
||||
* inform the JTree that this node has changed. Then, when the JTree queries this node for
|
||||
* its children, the {@link #generateChildren()} will get called to populate the node.
|
||||
*/
|
||||
public void reload() {
|
||||
if (isLoaded()) {
|
||||
|
|
|
@ -366,10 +366,10 @@ public class GTreeNodeTest {
|
|||
@Test
|
||||
public void testDispose() {
|
||||
root.dispose();
|
||||
assertTrue(!root.isLoaded());
|
||||
assertFalse(root.isLoaded());
|
||||
assertNull(node1.getParent());
|
||||
assertNull(node1_0.getParent());
|
||||
assertTrue(!node1.isLoaded());
|
||||
assertFalse(node1.isLoaded());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -411,7 +411,7 @@ public class GTreeNodeTest {
|
|||
|
||||
events.clear();
|
||||
node.unloadChildren();
|
||||
assertTrue(!node.isLoaded());
|
||||
assertFalse(node.isLoaded());
|
||||
assertTrue(events.isEmpty());
|
||||
}
|
||||
|
||||
|
@ -423,8 +423,8 @@ public class GTreeNodeTest {
|
|||
|
||||
events.clear();
|
||||
node.reload();
|
||||
assertTrue(!node.isLoaded());
|
||||
assertTrue(!events.isEmpty());
|
||||
assertFalse(node.isLoaded());
|
||||
assertFalse(events.isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue