public void actionPerformed(final ActionEvent event) {
final ResourceBundle resources = ResourceBundle.getBundle(CheckStyleConstants.RESOURCE_BUNDLE);
commitButton.setEnabled(false);
final ConfigurationLocation location;
switch (currentStep) {
case SELECT:
location = locationPanel.getConfigurationLocation();
if (location == null) {
showError(resources, resources.getString("config.file.no-file"));
return;
}
if (location.getDescription() == null || location.getDescription().isEmpty()) {
showError(resources, resources.getString("config.file.no-description"));
return;
}
Map<String, String> properties;
try {
location.resolve();
properties = location.getProperties();
} catch (IOException e) {
final String message = resources.getString("config.file.resolve-failed");
final String formattedMessage = new MessageFormat(message).format(new Object[]{e.getMessage()});
showError(resources, formattedMessage);