this.dispose();
}//GEN-LAST:event_btnCancelActionPerformed
private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed
Plugin item = (Plugin) cmbPlugin.getSelectedItem();
String name = item.getName();
try {
saveConfiguration(item.getFile(),
txtArea.getText());
//stopping and unloading the plugin
item.stop();
clients.remove(item);
//reload it with the new configuration
System.out.println(item.getFile().getParentFile().toString());
pluginsManager.loadSingleBoundle(item.getFile().getParentFile());
//if not loaded sucessfully reset to old configuration
if (clients.get(name) == null) {
//reset to old working config and reload plugin
rollbackConfiguration();
saveConfiguration(item.getFile(),
txtArea.getText());
pluginsManager.loadSingleBoundle(item.getFile().getParentFile());
clients.get(name).start();
JOptionPane.showMessageDialog(this,
I18n.msg("warn_reset_old_config"));
} else {
clients.get(name).start();