String pattern = patternText.getText();
IStructuredSelection selection = (IStructuredSelection) items
.getSelection();
int mode = 0;
if (!selection.isEmpty()) {
FilterMode moded = (FilterMode) selection.getFirstElement();
mode = moded.getMode();
filterLabel.setText(moded.getLimitLabel());
limitSpinner.setEnabled(true);
filterLabel.getParent().layout(new Control[] { filterLabel });
} else {
filterLabel.setText("Limit:");
filterLabel.getParent().layout(new Control[] { filterLabel });