I am writing an RCP application in eclipse that contains a combobox, and upon selecting any of its items, a selection event is being fired and some random code comes in action. The listener looks something like this:
randomComboBox.addSelectionListener(new SelectionListener(){
@Override
public void widgetSelected(SelectionEvent e) {
// random code
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// TODO Auto-generated method stub
}
});
My question is: is it possible to fire the event from the code? For example if I add:
randomComboBox.select(0);
no event is being fired. In this case, do I have to write my own listener?