private void fillComboBox() { myComboBox.removeAllItems(); for (XExpression expression : getRecentExpressions()) { myComboBox.addItem(expression); } if (myComboBox.getItemCount() > 0) { myComboBox.setSelectedIndex(0); } }
@Override protected void doSetText(XExpression text) { if (myComboBox.getItemCount() > 0) { myComboBox.setSelectedIndex(0); } // if (myComboBox.isEditable()) { myEditor.setItem(text); // } myExpression = text; }