List<Action> actionsList = new ArrayList<>();
if (!this.getDirectoryBrowseMode()) {
actionsList.add(new ViewContextAction(NbBundle.getMessage(this.getClass(), "FileNode.viewFileInDir.text"), this));
actionsList.add(null); // creates a menu separator
}
actionsList.add(new NewWindowViewAction(
NbBundle.getMessage(this.getClass(), "FileNode.getActions.viewInNewWin.text"), this));
actionsList.add(new ExternalViewerAction(
NbBundle.getMessage(this.getClass(), "FileNode.getActions.openInExtViewer.text"), this));
actionsList.add(null); // creates a menu separator
actionsList.add(ExtractAction.getInstance());