8074 improve context menu for ad hoc search

This commit is contained in:
Greg DiCristofaro 2021-09-30 19:59:38 -04:00
parent 738991b9ba
commit 22ca11bc17

View File

@ -160,10 +160,20 @@ class AdHocSearchFilterNode extends FilterNode {
private List<Action> getFileActions() {
List<Action> actionsList = new ArrayList<>();
boolean hasAbstractFile = getOriginal().getLookup().lookup(AbstractFile.class) != null;
actionsList.add(new NewWindowViewAction(NbBundle.getMessage(this.getClass(), "KeywordSearchFilterNode.getFileActions.viewInNewWinActionLbl"), AdHocSearchFilterNode.this));
if (hasAbstractFile) {
actionsList.add(new ExternalViewerAction(NbBundle.getMessage(this.getClass(), "KeywordSearchFilterNode.getFileActions.openExternViewActLbl"), getOriginal()));
}
actionsList.add(null);
if (hasAbstractFile) {
actionsList.add(ExtractAction.getInstance());
}
actionsList.add(ExportCSVAction.getInstance());
actionsList.add(null); // creates a menu separator
actionsList.add(AddContentTagAction.getInstance());