use of org.yakindu.base.types.Enumerator in project statecharts by Yakindu.
the class EnumerationEditingSupport method getCellEditor.
@Override
public CellEditor getCellEditor(Object element) {
if (element instanceof ExecutionSlot) {
EnumerationType e = getEnumerationType((ExecutionSlot) element);
List<String> enumeratorNames = new ArrayList<String>();
for (Enumerator enumerator : e.getEnumerator()) {
enumeratorNames.add(enumerator.getName());
}
return new ComboBoxCellEditor((Composite) getViewer().getControl(), enumeratorNames.toArray(new String[] {}), SWT.READ_ONLY);
}
return null;
}
Aggregations