PropertyEditor propertyEditor = property.getEditor();
// activate
propertyTable.setInput(new Property[]{property});
propertyTable.setActiveProperty(property);
propertyTable.activateEditor(property, null);
CComboBox combo = (CComboBox) getFieldValue(propertyEditor, "m_combo");
Text comboText = (Text) getFieldValue(combo, "m_text");
EventSender eventSender = new EventSender(comboText);
// has items
assertEquals(3, combo.getItemCount());
assertFalse(combo.isDroppedDown());
// drop-down in async
waitEventLoop(0);
assertTrue(combo.isDroppedDown());
// send ESC, close
{
eventSender.keyDown(SWT.ESC);
assertFalse(combo.isDroppedDown());
}
// set text
combo.setSelectionText("myStyle");
// apply text
eventSender.keyDown('\r');
assertEditor(getStyleSource("setStyleName('myStyle')"));
} finally {
propertyTable.dispose();