void () { // Explicit use of MutableCollectionComboBoxModel guarantees that setSelectedItem() can make safe cast. languageVersionComboBox = new ComboBox<>(new MutableCollectionComboBoxModel<>()); jpsPluginComboBoxModel = new ComboBoxModelWithPossiblyDisabledItems(); kotlinJpsPluginVersionComboBox = new ComboBox<>(jpsPluginComboBoxModel); apiVersionComboBox = new ComboBox<>(new MutableCollectionComboBoxModel<>()); // Workaround: ThreeStateCheckBox doesn't send suitable notification on state change // TODO: replace with PropertyChangerListener after fix is available in IDEA copyRuntimeFilesCheckBox = new ThreeStateCheckBox() { @Override public void setState(State state) { super.setState(state); updateOutputDirEnabled(); } }; }