19 package org.sleuthkit.autopsy.keywordsearch;
21 import java.util.ArrayList;
22 import java.util.List;
23 import javax.swing.Action;
24 import org.openide.nodes.FilterNode;
25 import org.openide.nodes.Node;
26 import org.openide.nodes.Node.Property;
27 import org.openide.nodes.Sheet;
28 import org.openide.util.NbBundle;
29 import org.openide.util.lookup.Lookups;
30 import org.openide.util.lookup.ProxyLookup;
45 class KeywordSearchFilterNode
extends FilterNode {
47 KeywordSearchFilterNode(QueryResults highlights, Node original) {
48 super(original, null,
new ProxyLookup(Lookups.singleton(highlights), original.getLookup()));
52 public Node.PropertySet[] getPropertySets() {
53 Node.PropertySet[] propertySets = super.getPropertySets();
55 for (
int i = 0; i < propertySets.length; i++) {
56 Node.PropertySet ps = propertySets[i];
58 if (ps.getName().equals(Sheet.PROPERTIES)) {
59 Sheet.Set newPs =
new Sheet.Set();
60 newPs.setName(ps.getName());
61 newPs.setDisplayName(ps.getDisplayName());
62 newPs.setShortDescription(ps.getShortDescription());
64 Property<?>[] oldProperties = ps.getProperties();
67 for (Property<?> p : oldProperties) {
71 propertySets[i] = newPs;
87 public Action[] getActions(
boolean popup) {
89 List<Action> actions =
new ArrayList<>();
91 Content content = this.getOriginal().getLookup().lookup(Content.class);
92 actions.addAll(content.accept(
new GetPopupActionsContentVisitor()));
94 return actions.toArray(
new Action[actions.size()]);
110 List<Action> actions =
new ArrayList<>();
111 actions.add(
new NewWindowViewAction(NbBundle.getMessage(
this.getClass(),
"KeywordSearchFilterNode.getFileActions.viewInNewWinActionLbl"), KeywordSearchFilterNode.this));
112 actions.add(
new ExternalViewerAction(NbBundle.getMessage(
this.getClass(),
"KeywordSearchFilterNode.getFileActions.openExternViewActLbl"), getOriginal()));
115 actions.add(
new HashSearchAction(NbBundle.getMessage(
this.getClass(),
"KeywordSearchFilterNode.getFileActions.searchSameMd5"), getOriginal()));
124 return new ArrayList<>();
static synchronized AddContentTagAction getInstance()