class OutputController implements Initializable {

    public @Inject UserInterfaceComponent ui;
    private @FXML VBox log;
    private @FXML ScrollPane logPane;
    private @FXML ToggleButton wrapTextBtn;
    private @FXML ToggleButton scrollToEndBtn;
    private @FXML Button clearLogBtn;

    @Override
    public void initialize(URL location, ResourceBundle resources) {<FILL_FUNCTION_BODY>}

    private void styleToolbarButton(ButtonBase btn, Node icon) {
        btn.setGraphic(icon);
        btn.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
    }

    private void scrollLogToEnd() {
        logPane.setVvalue(1.0);
    }
}

        Bindings.bindContent(
            log.getChildren(),
            ui.outputMessages()
        );

        log.heightProperty().addListener(e -> {
            if (scrollToEndBtn.isSelected()) {
                scrollLogToEnd();
            }
        });

        logPane.fitToWidthProperty().bind(wrapTextBtn.selectedProperty());

        scrollToEndBtn.setSelected(true);
        scrollToEndBtn.setOnAction(e -> {
            if (scrollToEndBtn.isSelected()) {
                scrollLogToEnd();
            }
        });

        clearLogBtn.setOnAction(ev -> ui.outputMessages().clear());
        clearLogBtn.disableProperty().bind(Bindings.isEmpty(log.getChildren()));

        styleToolbarButton(wrapTextBtn, MaterialIcon.WRAP_TEXT.view());
        styleToolbarButton(clearLogBtn, FontAwesome.TRASH.view());
        styleToolbarButton(scrollToEndBtn, MaterialIcon.SCROLL_TEXT.view());
    
<no_super_class>