AddAllowedValueDialog dialog = new AddAllowedValueDialog(this, null);
if (dialog.open() == Window.CANCEL) {
return;
}
AllowedValue av = UIMAFramework_impl.getResourceSpecifierFactory().createAllowedValue();
allowedValueUpdate(av, dialog);
addAllowedValue(localTd, av);
if (!Utility.arrayContains(td.getAllowedValues(), av))
addAllowedValue(td, (AllowedValue) av.clone());
else
refreshNeeded = true;
// update the GUI
if (refreshNeeded)
refresh();
else {
TableTreeItem item = new TableTreeItem(parent, SWT.NONE);
item.setText(NAME_COL, HEADER_ALLOWED_VALUE);
item.setText(AV_COL, convertNull(av.getString()));
item.setData(av);
parent.setExpanded(true);
}