Skip to content

Commit

Permalink
Reformat for codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed May 20, 2019
1 parent 37b5a68 commit ec888f1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/preferences/ExternalTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public Node getBuilder() {
}

private void addSettingsButton(final PushToApplication application, GridPane panel, int index) {
PushToApplicationSettings settings = PushToApplicationsManager.getSettings(application);
PushToApplicationSettings settings = PushToApplicationsManager.getSettings(application, dialogService);
Button button = new Button(Localization.lang("Settings for %0", application.getApplicationName()));
button.setPrefSize(150, 20);
button.setOnAction(e -> PushToApplicationSettingsDialog.showSettingsDialog(dialogService, settings, index));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ public AbstractPushToApplication(DialogService dialogService) {
this.dialogService = dialogService;
}

public DialogService getDialogService() {
return this.dialogService;
}

@Override
public String getName() {
return Localization.lang("Push entries to external application (%0)", getApplicationName());
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/jabref/gui/push/PushToApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public interface PushToApplication {

JabRefIcon getIcon();

DialogService getDialogService();

/**
* The actual operation. This method will not be called on the event dispatch thread, so it should not do GUI
* operations without utilizing invokeLater().
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/jabref/gui/push/PushToApplicationsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public List<PushToApplication> getApplications() {
return applications;
}

public static PushToApplicationSettings getSettings(PushToApplication application) {
public static PushToApplicationSettings getSettings(PushToApplication application, DialogService dialogService) {
if (application instanceof PushToEmacs) {
return new PushToEmacsSettings(application.getDialogService());
return new PushToEmacsSettings(dialogService);
} else if (application instanceof PushToLyx) {
return new PushToLyxSettings(application.getDialogService());
return new PushToLyxSettings(dialogService);
} else if (application instanceof PushToVim) {
return new PushToVimSettings(application.getDialogService());
return new PushToVimSettings(dialogService);
} else {
return new PushToApplicationSettings(application.getDialogService());
return new PushToApplicationSettings(dialogService);
}
}

Expand Down

0 comments on commit ec888f1

Please sign in to comment.