}
@Override
protected CellEditor getCellEditor(final Object element) {
FilterItemModel filterItemModel = (FilterItemModel) element;
CellEditor cellEditor = null;
// Add Levels ComboBox for Level type
if ((FilterConstants.LEVEL).equals(filterItemModel.getFieldType())) {
cellEditor = new ComboBoxCellEditor(tableViewer.getTable(), FilterConstants.LOG_LEVELS,
SWT.READ_ONLY);
} else {
cellEditor = new TextCellEditor(tableViewer.getTable());
// If need to enter Line number (Text with digits only)
if ((FilterConstants.LINE).equals(filterItemModel.getFieldType())) {
((Text) cellEditor.getControl()).addVerifyListener(new VerifyListener() {
@Override
public void verifyText(final VerifyEvent e) {
// Here, we could use a RegExp such as the following
// if using JRE1.4 such as e.doit = e.text.matches("[\\-0-9]*");
// another way to check: