void (final StringDescriptor descriptor) { myValue = descriptor; final JTextField textField = myTfWithButton.getTextField(); if(descriptor != null){ final String value = descriptor.getValue(); if(value != null){ // plain value textField.setEditable(true); textField.setText(value); textField.selectAll(); myTextFieldModified = false; } else{ // bundled value textField.setEditable(false); textField.setBackground(UIUtil.getTextFieldBackground()); textField.setText("[" + descriptor.getKey() + " / " + descriptor.getDottedBundleName() + "]"); } } else{ textField.setEditable(true); textField.setText(null); } }