fieldComboViewer = new ComboViewer(this, SWT.BORDER | SWT.READ_ONLY);
WritableList model = new WritableList(log.getDialect().getFieldProvider().getAllFields(),
ALogEntryField.class);
ViewerSupport.bind(fieldComboViewer, model,
PojoProperties.values(new String[] {"label"})); //$NON-NLS-1$
fieldComboViewer.setComparator(new ViewerComparator());
fieldComboViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent e) {
IStructuredSelection sel = (IStructuredSelection) e.getSelection();
ALogEntryField<?, ?> fld = (ALogEntryField<?, ?>) sel.getFirstElement();
updateOperatorCombo(fld);
recreateRenderer(fld);
renderer.validateInput(); // Revalidate
}
});
operatorComboViewer = new ComboViewer(this, SWT.BORDER | SWT.READ_ONLY);
operatorModel = WritableList.withElementType(Operator.class);
ViewerSupport.bind(operatorComboViewer, operatorModel,
PojoProperties.values(new String[] {"label"})); //$NON-NLS-1$
operatorComboViewer.setComparator(new ViewerComparator());
removeButton = new Button(this, SWT.NONE);
removeButton.setText(Messages.FilterClauseComposite_label_remove);
removeButton.addSelectionListener(new SelectionAdapter() {
/* (non-Javadoc)