Source:
<code>public ViewLibrary(String applicationName, ThemeManager themeManager, ObjectMapper objectMapper) { super("Library", themeManager); this.getStyleClass().add("mainWindowScene"); this.objectMapper = objectMapper; availableShortcuts = new CombinedListWidget<>(ListWidgetEntry::create, (selectedItem, event) -> { <START> final ShortcutDTO shortcutDTO = selectedItem; <END> availableShortcuts.deselectAll(); availableShortcuts.select(selectedItem); onShortcutSelected.accept(shortcutDTO); showShortcutDetails(shortcutDTO); sideBar.showShortcut(shortcutDTO); if (event.getClickCount() == 2) { onShortcutDoubleClicked.accept(shortcutDTO); } event.consume(); }); this.categories = FXCollections.observableArrayList(); this.sortedCategories = this.categories.sorted(Comparator.comparing(ShortcutCategoryDTO::getName)); this.shortcuts = new ExpandedList<ShortcutDTO, ShortcutCategoryDTO>(this.sortedCategories, ShortcutCategoryDTO::getShortcuts); this.filteredShortcuts = new FilteredList<ShortcutDTO>(this.shortcuts); this.sortedShortcuts = this.filteredShortcuts.sorted(Comparator.comparing(ShortcutDTO::getName)); this.filter = new ShortcutFilter<ShortcutDTO>(filteredShortcuts, (filterText, shortcut) -> shortcut.getName().toLowerCase().contains(filterText)); availableShortcuts.setOnMouseClicked(event -> { sideBar.hideShortcut(); availableShortcuts.deselectAll(); onShortcutSelected.accept(null); event.consume(); }); this.sideBar = new LibrarySideBar(applicationName, availableShortcuts); this.sideBar.bindCategories(this.sortedCategories); this.availableShortcuts.bind(sortedShortcuts); this.sideBar.setOnCategorySelection(category -> { filter.setFilters(category.getShortcuts()::contains); showAvailableShortcuts(); }); this.sideBar.setOnAllCategorySelection(() -> { filter.clearFilters(); showAvailableShortcuts(); }); this.drawContent(); this.setSideBar(sideBar); }</code><technical_language>This line is needed, simply a rename here. I selectedItem instead of shortcutDTO</technical_language>

Target:
public ViewLibrary(String applicationName, ThemeManager themeManager, ObjectMapper objectMapper) { super("Library", themeManager); this.getStyleClass().add("mainWindowScene"); this.objectMapper = objectMapper; availableShortcuts = new CombinedListWidget<>(ListWidgetEntry::create, (selectedItem, event) -> { availableShortcuts.deselectAll(); availableShortcuts.select(selectedItem); onShortcutSelected.accept(selectedItem); showShortcutDetails(selectedItem); sideBar.showShortcut(selectedItem); if (event.getClickCount() == 2) { onShortcutDoubleClicked.accept(selectedItem); } event.consume(); }); this.categories = FXCollections.observableArrayList(); this.sortedCategories = this.categories.sorted(Comparator.comparing(ShortcutCategoryDTO::getName)); this.shortcuts = new ExpandedList<ShortcutDTO, ShortcutCategoryDTO>(this.sortedCategories, ShortcutCategoryDTO::getShortcuts); this.filteredShortcuts = new FilteredList<ShortcutDTO>(this.shortcuts); this.sortedShortcuts = this.filteredShortcuts.sorted(Comparator.comparing(ShortcutDTO::getName)); this.filter = new ShortcutFilter<ShortcutDTO>(filteredShortcuts, (filterText, shortcut) -> shortcut.getName().toLowerCase().contains(filterText)); availableShortcuts.setOnMouseClicked(event -> { sideBar.hideShortcut(); availableShortcuts.deselectAll(); onShortcutSelected.accept(null); event.consume(); }); this.sideBar = new LibrarySideBar(applicationName, availableShortcuts); this.sideBar.bindCategories(this.sortedCategories); this.availableShortcuts.bind(sortedShortcuts); this.sideBar.setOnCategorySelection(category -> { filter.setFilters(category.getShortcuts()::contains); showAvailableShortcuts(); }); this.sideBar.setOnAllCategorySelection(() -> { filter.clearFilters(); showAvailableShortcuts(); }); this.drawContent(); this.setSideBar(sideBar); }