ProcessCasErrors processCasErrors = (ProcessCasErrors) obj;
processCasErrors.setValueById(id, selection);
processCasErrorsViewer.refresh();
} else if (obj instanceof CollectionProcessCompleteErrors) {
CollectionProcessCompleteErrors completeErrors = (CollectionProcessCompleteErrors) obj;
completeErrors.setValueById(id, selection);
collProcessCompleteErrorsViewer.refresh();
}
multiPageEditor.setFileDirty();
}
});
editor1.setEditor(spinner, item, 1);
} else if (nvp.getType() == String.class) {
final CCombo combo = new CCombo(table, SWT.BORDER | SWT.READ_ONLY);
combo.setItems(new String[] { "terminate", "disable" }); //$NON-NLS-1$
combo.setText(item.getText(1));
combo.pack();
combo.setFocus();
combo.addFocusListener(new FocusListener() {
public void focusGained(FocusEvent e) {
}
public void focusLost(FocusEvent e) {
// Clean up any previous editor control
Control oldEditor = editor1.getEditor();
if (oldEditor != null)
oldEditor.dispose();
oldEditor = editor2.getEditor();
if (oldEditor != null)
oldEditor.dispose();
combo.dispose();
}
});
combo.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String selection = combo.getText();
item.setText(1, selection);
int id = nvp.getId();
if (obj instanceof GetMetadataErrors) {
GetMetadataErrors getMetadataErrors = (GetMetadataErrors) obj;
getMetadataErrors.setValueById(id, selection);
getMetaDataViewer.refresh();
} else if (obj instanceof ProcessCasErrors) {
ProcessCasErrors processCasErrors = (ProcessCasErrors) obj;
processCasErrors.setValueById(id, selection);
processCasErrorsViewer.refresh();
} else if (obj instanceof CollectionProcessCompleteErrors) {
CollectionProcessCompleteErrors completeErrors = (CollectionProcessCompleteErrors) obj;
completeErrors.setValueById(id, selection);
collProcessCompleteErrorsViewer.refresh();
}
multiPageEditor.setFileDirty();
}
});