void () { if (getExportFormat() == ExportTestResultsConfiguration.ExportFormat.UserTemplate) { myCustomTemplateField.setEnabled(true); IdeFocusManager.findInstanceByComponent(myContentPane).requestFocus(myCustomTemplateField.getChildComponent(), true); } else { myCustomTemplateField.setEnabled(false); } String filename = myFileNameField.getText(); if (filename != null && filename.indexOf('.') != -1) { myFileNameField.setText(filename.substring(0, filename.lastIndexOf('.') + 1) + getExportFormat().getDefaultExtension()); } }