From 2d0f4dd9e8bc931cc4264eabf3a9d2400b4181ac Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Sat, 20 Apr 2019 12:29:44 +0200 Subject: [PATCH] remove dialog service argument --- .../gui/importer/actions/CheckForNewEntryTypesAction.java | 3 +-- .../org/jabref/gui/importer/actions/GUIPostOpenAction.java | 3 +-- .../gui/importer/actions/MergeReviewIntoCommentAction.java | 5 ++--- .../org/jabref/gui/importer/actions/OpenDatabaseAction.java | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/jabref/gui/importer/actions/CheckForNewEntryTypesAction.java b/src/main/java/org/jabref/gui/importer/actions/CheckForNewEntryTypesAction.java index ba46182c305..66a65efe8a7 100644 --- a/src/main/java/org/jabref/gui/importer/actions/CheckForNewEntryTypesAction.java +++ b/src/main/java/org/jabref/gui/importer/actions/CheckForNewEntryTypesAction.java @@ -5,7 +5,6 @@ import org.jabref.Globals; import org.jabref.gui.BasePanel; -import org.jabref.gui.DialogService; import org.jabref.gui.importer.ImportCustomEntryTypesDialog; import org.jabref.logic.importer.ParserResult; import org.jabref.model.EntryTypes; @@ -24,7 +23,7 @@ public boolean isActionNecessary(ParserResult parserResult) { } @Override - public void performAction(BasePanel panel, ParserResult parserResult, DialogService dialogService) { + public void performAction(BasePanel panel, ParserResult parserResult) { BibDatabaseMode mode = getBibDatabaseModeFromParserResult(parserResult); ImportCustomEntryTypesDialog dlg = new ImportCustomEntryTypesDialog(mode, getListOfUnknownAndUnequalCustomizations(parserResult)); diff --git a/src/main/java/org/jabref/gui/importer/actions/GUIPostOpenAction.java b/src/main/java/org/jabref/gui/importer/actions/GUIPostOpenAction.java index a7ded93acb7..5250d76d0a1 100644 --- a/src/main/java/org/jabref/gui/importer/actions/GUIPostOpenAction.java +++ b/src/main/java/org/jabref/gui/importer/actions/GUIPostOpenAction.java @@ -1,7 +1,6 @@ package org.jabref.gui.importer.actions; import org.jabref.gui.BasePanel; -import org.jabref.gui.DialogService; import org.jabref.logic.importer.ParserResult; /** @@ -35,5 +34,5 @@ public interface GUIPostOpenAction { * @param pr The result of the BIB parse operation. * @param dialogService */ - void performAction(BasePanel panel, ParserResult pr, DialogService dialogService); + void performAction(BasePanel panel, ParserResult pr); } diff --git a/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java b/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java index 2d9d18eb075..3196f1c46aa 100644 --- a/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java +++ b/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java @@ -3,7 +3,6 @@ import java.util.List; import org.jabref.gui.BasePanel; -import org.jabref.gui.DialogService; import org.jabref.logic.importer.ParserResult; import org.jabref.migrations.MergeReviewIntoCommentMigration; import org.jabref.model.entry.BibEntry; @@ -16,12 +15,12 @@ public boolean isActionNecessary(ParserResult parserResult) { } @Override - public void performAction(BasePanel basePanel, ParserResult parserResult, DialogService dialogService) { + public void performAction(BasePanel basePanel, ParserResult parserResult) { MergeReviewIntoCommentMigration migration = new MergeReviewIntoCommentMigration(); migration.performMigration(parserResult); List conflicts = MergeReviewIntoCommentMigration.collectConflicts(parserResult); - if (!conflicts.isEmpty() && new MergeReviewIntoCommentConfirmationDialog(dialogService).askUserForMerge(conflicts)) { + if (!conflicts.isEmpty() && new MergeReviewIntoCommentConfirmationDialog(basePanel.frame().getDialogService()).askUserForMerge(conflicts)) { migration.performConflictingMigration(parserResult); } } diff --git a/src/main/java/org/jabref/gui/importer/actions/OpenDatabaseAction.java b/src/main/java/org/jabref/gui/importer/actions/OpenDatabaseAction.java index 4f5a4102534..87dcf8b87a1 100644 --- a/src/main/java/org/jabref/gui/importer/actions/OpenDatabaseAction.java +++ b/src/main/java/org/jabref/gui/importer/actions/OpenDatabaseAction.java @@ -70,7 +70,7 @@ public OpenDatabaseAction(JabRefFrame frame) { public static void performPostOpenActions(BasePanel panel, ParserResult result, DialogService dialogService) { for (GUIPostOpenAction action : OpenDatabaseAction.POST_OPEN_ACTIONS) { if (action.isActionNecessary(result)) { - action.performAction(panel, result, dialogService); + action.performAction(panel, result); panel.frame().showBasePanel(panel); } }