Skip to content

Commit

Permalink
Compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Jun 3, 2018
1 parent 55c3626 commit 3044350
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/gui/exporter/ExportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private void export(Path file, FileChooser.ExtensionFilter selectedExtensionFilt

// Make sure we remember which filter was used, to set
// the default for next time:
Globals.prefs.put(JabRefPreferences.LAST_USED_EXPORT, format.getDescription());
Globals.prefs.put(JabRefPreferences.LAST_USED_EXPORT, format.getName());
Globals.prefs.put(JabRefPreferences.EXPORT_WORKING_DIRECTORY, file.getParent().toString());

final List<BibEntry> finEntries = entries;
Expand Down Expand Up @@ -120,7 +120,7 @@ public void run() {
public void update() {
// No error message. Report success:
if (errorMessage == null) {
frame.output(Localization.lang("%0 export successful", format.getDisplayName()));
frame.output(Localization.lang("%0 export successful", format.getName()));
}
// ... or show an error dialog:
else {
Expand All @@ -141,7 +141,7 @@ public void update() {
private static FileDialogConfiguration createExportFileChooser(ExporterFactory exportFactory, String currentDir) {
List<FileType> fileTypes = exportFactory.getExporters().stream().map(Exporter::getFileType).collect(Collectors.toList());
return new FileDialogConfiguration.Builder()
.addExtensionFilters(fileTypes)
.addExtensionFilter(fileTypes.toArray(new FileType[fileTypes.size()]))
.withDefaultExtension(Globals.prefs.get(JabRefPreferences.LAST_USED_EXPORT))
.withInitialDirectory(currentDir)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void run() {
}

List<Exporter> exporters = Globals.exportFactory.getExporters().stream()
.sorted(Comparator.comparing(Exporter::getDisplayName))
.sorted(Comparator.comparing(Exporter::getName))
.collect(Collectors.toList());

Optional<Exporter> selectedExporter = frame.getDialogService().showChoiceDialogAndWait(Localization.lang("Export"), Localization.lang("Select export format"),
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/importer/ImportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void execute() {
FileDialogConfiguration fileDialogConfiguration = new FileDialogConfiguration.Builder()
.addExtensionFilter(anyFile)
.addExtensionFilter(allImports)
.addExtensionFilters(extensions)
.addExtensionFilter(extensions.toArray(new FileType[extensions.size()]))
.withInitialDirectory(Globals.prefs.get(JabRefPreferences.IMPORT_WORKING_DIRECTORY))
.build();
DefaultTaskExecutor.runInJavaFXThread(() -> {
Expand Down

0 comments on commit 3044350

Please sign in to comment.