Source:
private void bind() { bindingContext.bindValue(WidgetProperties.text().observe(lblError), BeanProperties.value("message").observe(model)); bindingContext.bindValue(WidgetProperties.text().observe(lblLastUpdate), BeanProperties.value("lastUpdate").observe(model)); bindingContext.bindValue(WidgetProperties.maximum().observe(spinnerPageNumber), BeanProperties.value("pageNumberMax").observe(model)); spinnerPageNumber.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setProgressIndicatorsVisible(true); model.setPageNumber(spinnerPageNumber.getSelection()).thenAccept(ignored -> setProgressIndicatorsVisible(false)); } }); btnRefresh.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { resetPageNumber(); setProgressIndicatorsVisible(true); model.setPageNumber(1).thenAccept(ignored -> setProgressIndicatorsVisible(false)); } }); btnSearch.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { resetPageNumber(); search(); } }); btnClear.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { resetPageNumber(); searchInput.clearInput(); model.resetActiveParameters(); setProgressIndicatorsVisible(true); model.setPageNumber(1).thenAccept(ignored -> setProgressIndicatorsVisible(false)); } }); model.addPropertyChangeListener("runs", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { DISPLAY.asyncExec(new Runnable() { @Override public void run() { setProgressIndicatorsVisible(true); changeTableColumns(); table.setRows(model.getRuns()); setProgressIndicatorsVisible(false); } }); } }); }

Target:
private void bind() { bindingContext.bindValue(WidgetProperties.text().observe(lblError), BeanProperties.value("message").observe(model)); bindingContext.bindValue(WidgetProperties.text().observe(lblLastUpdate), BeanProperties.value("lastUpdate").observe(model)); bindingContext.bindValue(WidgetProperties.maximum().observe(spinnerPageNumber), BeanProperties.value("pageNumberMax").observe(model)); spinnerPageNumber.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setProgressIndicatorsVisible(true); model.setPageNumber(spinnerPageNumber.getSelection()).thenAccept(ignored -> setProgressIndicatorsVisible(false)); } }); btnRefresh.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { resetPageNumber(); setProgressIndicatorsVisible(true); model.setPageNumber(1).thenAccept(ignored -> setProgressIndicatorsVisible(false)); } }); btnSearch.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { search(); } }); btnClear.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { resetPageNumber(); searchInput.clearInput(); model.resetActiveSearch(); setProgressIndicatorsVisible(true); model.setPageNumber(1).thenAccept(ignored -> setProgressIndicatorsVisible(false)); } }); model.addPropertyChangeListener("runs", e -> DISPLAY.asyncExec(() -> { setProgressIndicatorsVisible(true); changeTableColumns(); table.setRows(model.getRuns()); setProgressIndicatorsVisible(false); })); searchInput.addSearchListeners(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) { search(); } } }); }