Skip to content

Commit

Permalink
Remove record return
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Jun 17, 2024
1 parent 3de60c6 commit 365c108
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main/java/org/jabref/gui/entryeditor/EntryEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ public EntryEditor(LibraryTab libraryTab) {
.load();
setupKeyBindings();

CreateTabsResult createTabsResult = createTabs();
this.allPossibleTabs = createTabsResult.tabs;
this.previewTabs = createTabsResult.previewTabs;
this.allPossibleTabs = createTabs();
this.previewTabs = this.allPossibleTabs.stream().filter(OffersPreview.class::isInstance).map(OffersPreview.class::cast).toList()

setupDragAndDrop(libraryTab);

Expand Down Expand Up @@ -255,10 +254,7 @@ private void navigateToNextEntry() {
libraryTab.selectNextEntry();
}

private record CreateTabsResult(List<EntryEditorTab> tabs, Collection<OffersPreview> previewTabs) {
}

private CreateTabsResult createTabs() {
private List<EntryEditorTab> createTabs() {
List<EntryEditorTab> tabs = new LinkedList<>();

tabs.add(new PreviewTab(databaseContext, dialogService, preferencesService, stateManager, themeManager, libraryTab.getIndexingTaskManager(), taskExecutor));
Expand Down Expand Up @@ -298,7 +294,7 @@ private CreateTabsResult createTabs() {
tabs.add(new LatexCitationsTab(databaseContext, preferencesService, dialogService, directoryMonitorManager));
tabs.add(new FulltextSearchResultsTab(stateManager, preferencesService, dialogService, taskExecutor));

return new CreateTabsResult(tabs, tabs.stream().filter(OffersPreview.class::isInstance).map(OffersPreview.class::cast).toList());
return tabs;
}

/**
Expand Down

0 comments on commit 365c108

Please sign in to comment.