Source:
<code>protected void activate() { sortedList = new SortedList<>(model.dataModel.list); sortedList.comparatorProperty().bind(tableView.comparatorProperty()); tableView.setItems(sortedList); scene = root.getScene(); if (scene != null) { scene.addEventHandler(KeyEvent.KEY_RELEASED, keyEventEventHandler); } selectedItemSubscription = EasyBind.subscribe(model.dataModel.selectedItemProperty, selectedItem -> { if (selectedItem != null) { if (selectedSubView != null) selectedSubView.deactivate(); if (selectedItem.getTrade() != null) { selectedSubView = model.dataModel.tradeManager.isBuyer(model.dataModel.getOffer()) ? new BuyerSubView(model) : new SellerSubView(model); selectedSubView.setMinHeight(440); VBox.setVgrow(selectedSubView, Priority.ALWAYS); if (root.getChildren().size() == 1) root.getChildren().add(selectedSubView); else if (root.getChildren().size() == 2) root.getChildren().set(1, selectedSubView); <START> ChatCallback chatCallback = trade -> { openChat(trade); }; <END> selectedSubView.setChatCallback(chatCallback); } updateTableSelection(); } else { removeSelectedSubView(); } model.onSelectedItemChanged(selectedItem); if (selectedSubView != null && selectedItem != null) selectedSubView.activate(); }); selectedTableItemSubscription = EasyBind.subscribe(tableView.getSelectionModel().selectedItemProperty(), selectedItem -> { if (selectedItem != null && !selectedItem.equals(model.dataModel.selectedItemProperty.get())) model.dataModel.onSelectItem(selectedItem); }); updateTableSelection(); model.dataModel.list.addListener(tradesListChangeListener); updateNewChatMessagesByTradeMap(); }</code><technical_language>suggestion ChatCallback chatCallback = this::openChat;</technical_language>

Target:
protected void activate() { sortedList = new SortedList<>(model.dataModel.list); sortedList.comparatorProperty().bind(tableView.comparatorProperty()); tableView.setItems(sortedList); scene = root.getScene(); if (scene != null) { scene.addEventHandler(KeyEvent.KEY_RELEASED, keyEventEventHandler); } selectedItemSubscription = EasyBind.subscribe(model.dataModel.selectedItemProperty, selectedItem -> { if (selectedItem != null) { if (selectedSubView != null) selectedSubView.deactivate(); if (selectedItem.getTrade() != null) { selectedSubView = model.dataModel.tradeManager.isBuyer(model.dataModel.getOffer()) ? new BuyerSubView(model) : new SellerSubView(model); selectedSubView.setMinHeight(440); VBox.setVgrow(selectedSubView, Priority.ALWAYS); if (root.getChildren().size() == 1) root.getChildren().add(selectedSubView); else if (root.getChildren().size() == 2) root.getChildren().set(1, selectedSubView); ChatCallback chatCallback = this::openChat; selectedSubView.setChatCallback(chatCallback); } updateTableSelection(); } else { removeSelectedSubView(); } model.onSelectedItemChanged(selectedItem); if (selectedSubView != null && selectedItem != null) selectedSubView.activate(); }); selectedTableItemSubscription = EasyBind.subscribe(tableView.getSelectionModel().selectedItemProperty(), selectedItem -> { if (selectedItem != null && !selectedItem.equals(model.dataModel.selectedItemProperty.get())) model.dataModel.onSelectItem(selectedItem); }); updateTableSelection(); model.dataModel.list.addListener(tradesListChangeListener); updateNewChatMessagesByTradeMap(); }