From 55077002d3dbcf41fa77ab3e6a122033bf2d40f5 Mon Sep 17 00:00:00 2001 From: adam-m Date: Wed, 6 Mar 2013 10:24:53 -0500 Subject: [PATCH] remove stub methods in action visitor and use defaultVisit() --- .../directorytree/DataResultFilterNode.java | 109 ++---------------- 1 file changed, 8 insertions(+), 101 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java b/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java index a19be05be5..10e98b0d45 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java @@ -153,90 +153,6 @@ public class DataResultFilterNode extends FilterNode { */ private static class GetPopupActionsDisplayableItemNodeVisitor extends DisplayableItemNodeVisitor.Default> { - @Override - public List visit(ImageNode img) { - List actions = new ArrayList(); - - //retain actions from the node if any - for (Action a : img.getActions(true)) { - actions.add(a); - } - - return actions; - } - - @Override - public List visit(VolumeNode vol) { - List actions = new ArrayList(); - - //retain actions from the node if any - for (Action a : vol.getActions(true)) { - actions.add(a); - } - - return actions; - } - - @Override - public List visit(DirectoryNode dir) { - //preserve the default node's actions - List actions = new ArrayList(); - - for (Action action : dir.getActions(true)) { - actions.add(action); - } - - return actions; - } - - @Override - public List visit(LayoutFileNode lf) { - List actions = new ArrayList(); - - //retain actions from the node if any - for (Action a : lf.getActions(true)) { - actions.add(a); - } - - return actions; - } - - @Override - public List visit(VirtualDirectoryNode ld) { - List actions = new ArrayList(); - - //retain actions from the node if any - for (Action a : ld.getActions(true)) { - actions.add(a); - } - - actions.add(new TagFileAction(ld)); - return actions; - } - - @Override - public List visit(DerivedFileNode dfn) { - List actions = new ArrayList(); - - //retain actions from the node if any - for (Action a : dfn.getActions(true)) { - actions.add(a); - } - - return actions; - } - - @Override - public List visit(FileNode f) { - //preserve the default node's actions - List actions = new ArrayList(); - - for (Action action : f.getActions(true)) { - actions.add(action); - } - - return actions; - } @Override public List visit(BlackboardArtifactNode ban) { @@ -311,27 +227,18 @@ public class DataResultFilterNode extends FilterNode { return actions; } - @Override - public List visit(KeywordHitsRootNode khrn) { - return super.visit(khrn); - } - - @Override - public List visit(KeywordHitsListNode khsn) { - - return super.visit(khsn); - } - - @Override - public List visit(KeywordHitsKeywordNode khmln) { - - return super.visit(khmln); - } @Override protected List defaultVisit(DisplayableItemNode ditem) { - return Collections.emptyList(); + //preserve the default node's actions + List actions = new ArrayList(); + + for (Action action : ditem.getActions(true)) { + actions.add(action); + } + + return actions; } private Content findLinked(BlackboardArtifactNode ba) {