From b02f982d409c78af4e9feb18b55eece44defe30e Mon Sep 17 00:00:00 2001 From: Stefan Kolb Date: Fri, 13 Mar 2020 19:31:05 +0100 Subject: [PATCH] Really create new lookup menu (#6111) Refs https://github.com/JabRef/jabref/pull/5989 Fixes https://github.com/koppor/jabref/issues/404 --- src/main/java/org/jabref/gui/JabRefFrame.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index fc21d0b2b43..355fcd9d066 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -488,9 +488,9 @@ private Node createToolbar() { new Separator(Orientation.VERTICAL), factory.createIconButton(StandardActions.UNDO, new UndoRedoAction(StandardActions.UNDO, this, dialogService, stateManager)), factory.createIconButton(StandardActions.REDO, new UndoRedoAction(StandardActions.REDO, this, dialogService, stateManager)), - factory.createIconButton(StandardActions.CUT, new EditAction(StandardActions.CUT,this, stateManager)), - factory.createIconButton(StandardActions.COPY, new EditAction(StandardActions.COPY,this, stateManager)), - factory.createIconButton(StandardActions.PASTE, new EditAction(StandardActions.PASTE,this, stateManager)), + factory.createIconButton(StandardActions.CUT, new EditAction(StandardActions.CUT, this, stateManager)), + factory.createIconButton(StandardActions.COPY, new EditAction(StandardActions.COPY, this, stateManager)), + factory.createIconButton(StandardActions.PASTE, new EditAction(StandardActions.PASTE, this, stateManager)), new Separator(Orientation.VERTICAL), pushToApplicationButton, factory.createIconButton(StandardActions.GENERATE_CITE_KEYS, new GenerateBibtexKeyAction(this, dialogService, stateManager)), @@ -723,7 +723,7 @@ private MenuBar createMenu() { new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.REPLACE_ALL, new ReplaceStringAction( this, stateManager)), + factory.createMenuItem(StandardActions.REPLACE_ALL, new ReplaceStringAction(this, stateManager)), factory.createMenuItem(StandardActions.GENERATE_CITE_KEYS, new GenerateBibtexKeyAction(this, dialogService, stateManager)), new SeparatorMenuItem(), @@ -780,16 +780,21 @@ private MenuBar createMenu() { factory.createMenuItem(StandardActions.UNABBREVIATE, new AbbreviateAction(StandardActions.UNABBREVIATE, this, dialogService, stateManager, prefs)) ); - lookup.getItems().addAll( - factory.createMenuItem(StandardActions.FIND_DUPLICATES, new DuplicateSearch(this, dialogService, stateManager)) - ); - Menu lookupIdentifiers = factory.createSubMenu(StandardActions.LOOKUP_DOC_IDENTIFIER); for (IdFetcher fetcher : WebFetchers.getIdFetchers(Globals.prefs.getImportFormatPreferences())) { LookupIdentifierAction identifierAction = new LookupIdentifierAction<>(this, fetcher, stateManager, undoManager); lookupIdentifiers.getItems().add(factory.createMenuItem(identifierAction.getAction(), identifierAction)); } + lookup.getItems().addAll( + lookupIdentifiers, + factory.createMenuItem(StandardActions.DOWNLOAD_FULL_TEXT, new DownloadFullTextAction(dialogService, stateManager, prefs)), + + new SeparatorMenuItem(), + + factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this, stateManager)) + ); + // PushToApplication final PushToApplicationAction pushToApplicationAction = pushToApplicationsManager.getPushToApplicationAction(); final MenuItem pushToApplicationMenuItem = factory.createMenuItem(pushToApplicationAction.getActionInformation(), pushToApplicationAction); @@ -801,17 +806,11 @@ private MenuBar createMenu() { new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this, stateManager)), factory.createMenuItem(StandardActions.WRITE_XMP, new WriteXMPAction(stateManager, dialogService)), factory.createMenuItem(StandardActions.COPY_LINKED_FILES, new CopyFilesAction(stateManager, this.getDialogService())), new SeparatorMenuItem(), - lookupIdentifiers, - factory.createMenuItem(StandardActions.DOWNLOAD_FULL_TEXT, new DownloadFullTextAction(dialogService, stateManager, prefs)), - - new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.SEND_AS_EMAIL, new SendAsEMailAction(dialogService, stateManager)), pushToApplicationMenuItem ); @@ -895,6 +894,7 @@ private MenuBar createMenu() { edit, library, quality, + lookup, tools, view, options,