Skip to content

Commit

Permalink
remove dialog service argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Apr 20, 2019
1 parent af992a3 commit 2d0f4dd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

/**
Expand Down Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<BibEntry> 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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 2d0f4dd

Please sign in to comment.