final Combo dslCombo = new Combo( composite,
SWT.READ_ONLY );
dslCombo.add( heading );
for ( int i = 0; i < getCompletion().getDSLActions().length; i++ ) {
DSLSentence sen = getCompletion().getDSLActions()[i];
dslCombo.add( sen.toString() );
}
dslCombo.select( 0 );
dslCombo.addListener( SWT.Selection,
new Listener() {
public void handleEvent(Event event) {
if ( dslCombo.getSelectionIndex() == 0 ) {
return;
}
DSLSentence sentence = getCompletion().getDSLActions()[dslCombo.getSelectionIndex() - 1];
modeller.getModel().addRhsItem( sentence.copy() );
modeller.setDirty( true );
modeller.reloadRhs();
close();
}
} );