Fixed mistake made when changing constructor of Known File Filter Node.

This commit is contained in:
Jeff Wallace 2013-10-16 09:37:58 -04:00
parent 4940e06e0e
commit 2256b6a095
2 changed files with 5 additions and 5 deletions

View File

@ -95,8 +95,8 @@ public class KnownFileFilterNode extends FilterNode {
* @param arg
* @param context
*/
public KnownFileFilterNode(Node arg) {
super(arg, new KnownFileFilterChildren(arg, getSelectionContext(arg)));
public KnownFileFilterNode(Node arg, SelectionContext context) {
super(arg, new KnownFileFilterChildren(arg, context));
if (addListener) {
addPreferenceListener();
@ -114,7 +114,7 @@ public class KnownFileFilterNode extends FilterNode {
* @param n
* @return
*/
private static SelectionContext getSelectionContext(Node n) {
public static SelectionContext getSelectionContext(Node n) {
if (n == null || n.getParentNode() == null) {
// Parent of root node or root node. Occurs during case open / close.
return SelectionContext.OTHER;
@ -198,7 +198,7 @@ public class KnownFileFilterNode extends FilterNode {
if (filter) {
// Filter out child nodes that represent known files
AbstractFile file = arg.getLookup().lookup(AbstractFile.class);
if (file!= null && file.getKnown() == TskData.FileKnown.KNOWN) {
if (file != null && (file.getKnown() == TskData.FileKnown.KNOWN)) {
return new Node[]{};
}
}

View File

@ -635,7 +635,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
//set node, wrap in filter node first to filter out children
Node drfn = new DataResultFilterNode(originNode, DirectoryTreeTopComponent.this.em);
Node kffn = new KnownFileFilterNode(drfn);
Node kffn = new KnownFileFilterNode(drfn, KnownFileFilterNode.getSelectionContext(originNode));
dataResult.setNode(new TableFilterNode(kffn, true));
String displayName = "";