Open file search by attribs option available for logical FS

This commit is contained in:
sidheshenator 2015-05-15 10:59:21 -04:00
parent e1a9084e7a
commit aa8bd58939

View File

@ -107,13 +107,7 @@ class DirectoryTreeFilterNode extends FilterNode {
actions.add(ExtractAction.getInstance()); actions.add(ExtractAction.getInstance());
} }
// file search action
final Image img = this.getLookup().lookup(Image.class); final Image img = this.getLookup().lookup(Image.class);
if (img != null) {
actions.add(new FileSearchAction(
NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.openFileSrcByAttr.text")));
}
VirtualDirectory virtualDirectory = this.getLookup().lookup(VirtualDirectory.class); VirtualDirectory virtualDirectory = this.getLookup().lookup(VirtualDirectory.class);
// determine if the virtualDireory is at root-level (Logical File Set). // determine if the virtualDireory is at root-level (Logical File Set).
@ -127,6 +121,12 @@ class DirectoryTreeFilterNode extends FilterNode {
} }
} }
// file search action only if the selected node is img node or a root level virtual directory.
if (img != null || isRootVD) {
actions.add(new FileSearchAction(
NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.openFileSrcByAttr.text")));
}
//ingest action only if the selected node is img node or a root level virtual directory. //ingest action only if the selected node is img node or a root level virtual directory.
if(img != null || isRootVD) { if(img != null || isRootVD) {
actions.add(new AbstractAction( actions.add(new AbstractAction(