void (final @NlsSafe String[] possibleNames, boolean createNew) { setTitle(GroovyBundle.message("convert.param.to.map.entry")); if (GroovyApplicationSettings.getInstance().CONVERT_PARAM_CREATE_NEW_PARAM != null) { myCreateNew.setSelected(createNew = GroovyApplicationSettings.getInstance().CONVERT_PARAM_CREATE_NEW_PARAM.booleanValue()); } else { myCreateNew.setSelected(createNew); } myNameLabel.setLabelFor(myNameComboBox); myCbTypeSpec.setMnemonic(KeyEvent.VK_T); myCbTypeSpec.setFocusable(false); setUpNameComboBox(possibleNames); setModal(true); if (GroovyApplicationSettings.getInstance().CONVERT_PARAM_SPECIFY_MAP_TYPE != null) { myCbTypeSpec.setSelected(GroovyApplicationSettings.getInstance().CONVERT_PARAM_SPECIFY_MAP_TYPE.booleanValue()); } else { myCbTypeSpec.setSelected(true); } myCbTypeSpec.setEnabled(createNew); myNameComboBox.setEnabled(createNew); myNameLabel.setEnabled(createNew); myCreateNew.addChangeListener(new ChangeListener() { @Override public void stateChanged(final ChangeEvent e) { final boolean flag = myCreateNew.isSelected(); myCbTypeSpec.setEnabled(flag); myNameComboBox.setEnabled(flag); myNameLabel.setEnabled(flag); } }); }