use of org.jabref.gui.actions.LookupIdentifierAction in project jabref by JabRef.
the class JabRefFrame method fillMenu.
private void fillMenu() {
mb.setBorder(null);
JMenu file = JabRefFrame.subMenu(Localization.menuTitle("File"));
JMenu edit = JabRefFrame.subMenu(Localization.menuTitle("Edit"));
JMenu search = JabRefFrame.subMenu(Localization.menuTitle("Search"));
JMenu groups = JabRefFrame.subMenu(Localization.menuTitle("Groups"));
JMenu bibtex = JabRefFrame.subMenu("&BibTeX");
JMenu quality = JabRefFrame.subMenu(Localization.menuTitle("Quality"));
JMenu view = JabRefFrame.subMenu(Localization.menuTitle("View"));
JMenu tools = JabRefFrame.subMenu(Localization.menuTitle("Tools"));
JMenu options = JabRefFrame.subMenu(Localization.menuTitle("Options"));
newSpec = JabRefFrame.subMenu(Localization.menuTitle("New entry by type..."));
JMenu helpMenu = JabRefFrame.subMenu(Localization.menuTitle("Help"));
file.add(newBibtexDatabaseAction);
file.add(newBiblatexDatabaseAction);
file.add(getOpenDatabaseAction());
file.add(mergeDatabaseAction);
file.add(save);
file.add(saveAs);
file.add(saveAll);
file.add(saveSelectedAs);
file.add(saveSelectedAsPlain);
file.addSeparator();
file.add(importNew);
file.add(importCurrent);
file.add(exportAll);
file.add(exportSelected);
file.addSeparator();
file.add(connectToSharedDatabaseAction);
file.add(pullChangesFromSharedDatabase);
file.addSeparator();
file.add(databaseProperties);
file.add(editModeAction);
file.addSeparator();
file.add(fileHistory);
file.addSeparator();
file.add(closeDatabaseAction);
file.add(quit);
mb.add(file);
edit.add(undo);
edit.add(redo);
edit.addSeparator();
edit.add(cut);
edit.add(copy);
edit.add(paste);
edit.addSeparator();
edit.add(copyTitle);
edit.add(copyKey);
edit.add(copyCiteKey);
edit.add(copyKeyAndTitle);
edit.add(copyKeyAndLink);
edit.add(copyPreview);
edit.add(exportToClipboard);
edit.add(sendAsEmail);
edit.addSeparator();
edit.add(mark);
for (int i = 0; i < EntryMarker.MAX_MARKING_LEVEL; i++) {
markSpecific.add(new MarkEntriesAction(this, i).getMenuItem());
}
edit.add(markSpecific);
edit.add(unmark);
edit.add(unmarkAll);
edit.addSeparator();
if (Globals.prefs.getBoolean(JabRefPreferences.SPECIALFIELDSENABLED)) {
boolean menuitem = false;
if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RANKING)) {
rankSubMenu = new JMenu();
RightClickMenu.populateSpecialFieldMenu(rankSubMenu, SpecialField.RANKING, this);
edit.add(rankSubMenu);
menuitem = true;
}
if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RELEVANCE)) {
edit.add(toggleRelevance);
menuitem = true;
}
if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_QUALITY)) {
edit.add(toggleQualityAssured);
menuitem = true;
}
if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_PRIORITY)) {
rankSubMenu = new JMenu();
RightClickMenu.populateSpecialFieldMenu(rankSubMenu, SpecialField.PRIORITY, this);
edit.add(rankSubMenu);
menuitem = true;
}
if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_PRINTED)) {
edit.add(togglePrinted);
menuitem = true;
}
if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_READ)) {
rankSubMenu = new JMenu();
RightClickMenu.populateSpecialFieldMenu(rankSubMenu, SpecialField.READ_STATUS, this);
edit.add(rankSubMenu);
menuitem = true;
}
if (menuitem) {
edit.addSeparator();
}
}
edit.add(getManageKeywords());
edit.add(getMassSetField());
edit.addSeparator();
edit.add(selectAll);
mb.add(edit);
search.add(normalSearch);
search.add(replaceAll);
search.addSeparator();
search.add(new JCheckBoxMenuItem(generalFetcher.getToggleAction()));
if (prefs.getBoolean(JabRefPreferences.WEB_SEARCH_VISIBLE)) {
sidePaneManager.register(generalFetcher);
sidePaneManager.show(GeneralFetcher.class);
}
mb.add(search);
groups.add(new JCheckBoxMenuItem(groupSidePane.getToggleAction()));
if (prefs.getBoolean(JabRefPreferences.GROUP_SIDEPANE_VISIBLE)) {
sidePaneManager.register(groupSidePane);
sidePaneManager.show(GroupSidePane.class);
}
groups.addSeparator();
groups.add(addToGroup);
groups.add(removeFromGroup);
groups.add(moveToGroup);
mb.add(groups);
view.add(getBackAction());
view.add(getForwardAction());
view.add(focusTable);
view.add(nextTab);
view.add(prevTab);
view.add(sortTabs);
view.addSeparator();
view.add(increaseFontSize);
view.add(decreseFontSize);
view.add(defaultFontSize);
view.addSeparator();
view.add(new JCheckBoxMenuItem(toggleToolbar));
view.add(new JCheckBoxMenuItem(enableToggle(generalFetcher.getToggleAction())));
view.add(new JCheckBoxMenuItem(groupSidePane.getToggleAction()));
view.add(new JCheckBoxMenuItem(togglePreview));
view.add(showPdvViewer);
view.add(getNextPreviewStyleAction());
view.add(getPreviousPreviewStyleAction());
mb.add(view);
bibtex.add(newEntryAction);
for (NewEntryAction a : newSpecificEntryAction) {
newSpec.add(a);
}
bibtex.add(newSpec);
bibtex.add(plainTextImport);
bibtex.addSeparator();
bibtex.add(editEntry);
bibtex.add(editPreamble);
bibtex.add(editStrings);
bibtex.addSeparator();
bibtex.add(customizeAction);
bibtex.addSeparator();
bibtex.add(deleteEntry);
mb.add(bibtex);
quality.add(dupliCheck);
quality.add(mergeEntries);
quality.addSeparator();
quality.add(resolveDuplicateKeys);
quality.add(checkIntegrity);
quality.add(cleanupEntries);
quality.add(massSetField);
quality.add(makeKeyAction);
quality.addSeparator();
quality.add(autoSetFile);
quality.add(findUnlinkedFiles);
quality.add(autoLinkFile);
for (IdFetcher fetcher : WebFetchers.getIdFetchers(Globals.prefs.getImportFormatPreferences())) {
lookupIdentifiers.add(new LookupIdentifierAction(this, fetcher));
}
quality.add(lookupIdentifiers);
quality.add(downloadFullText);
mb.add(quality);
tools.add(newSubDatabaseAction);
tools.add(writeXmpAction);
tools.add(new JCheckBoxMenuItem(openOfficePanel.getToggleAction()));
tools.add(pushExternalButton.getMenuAction());
tools.addSeparator();
tools.add(openFolder);
tools.add(openFile);
tools.add(openUrl);
tools.add(openConsole);
tools.addSeparator();
tools.add(abbreviateIso);
tools.add(abbreviateMedline);
tools.add(unabbreviate);
mb.add(tools);
options.add(showPrefs);
AbstractAction genFieldsCustomization = new GenFieldsCustomizationAction();
AbstractAction protectTerms = new ProtectedTermsAction();
options.add(genFieldsCustomization);
options.add(customImpAction);
options.add(customExpAction);
options.add(customFileTypesAction);
options.add(manageJournals);
options.add(keyBindingAction);
options.add(protectTerms);
options.add(manageSelectors);
mb.add(options);
helpMenu.add(help);
helpMenu.add(openForumAction);
helpMenu.addSeparator();
helpMenu.add(errorConsole);
helpMenu.addSeparator();
helpMenu.add(new SearchForUpdateAction());
JMenu webMenu = JabRefFrame.subMenu(Localization.menuTitle("JabRef resources"));
webMenu.add(jabrefWebPageAction);
webMenu.add(jabrefBlogAction);
webMenu.add(jabrefFacebookAction);
webMenu.addSeparator();
webMenu.add(forkMeOnGitHubAction);
webMenu.add(developmentVersionAction);
webMenu.add(changeLogAction);
webMenu.addSeparator();
webMenu.add(donationAction);
helpMenu.add(webMenu);
helpMenu.add(about);
mb.add(helpMenu);
createDisabledIconsForMenuEntries(mb);
}
Aggregations