* Removes a remote
*/
public class RemoveRemoteCommand extends
RepositoriesViewCommandHandler<RemoteNode> {
public Object execute(ExecutionEvent event) throws ExecutionException {
final RemoteNode node = getSelectedNodes(event).get(0);
final String configName = node.getObject();
boolean ok = MessageDialog.openConfirm(getShell(event),
UIText.RepositoriesView_ConfirmDeleteRemoteHeader, NLS.bind(
UIText.RepositoriesView_ConfirmDeleteRemoteMessage,
configName));
if (ok) {
StoredConfig config = node.getRepository().getConfig();
config.unsetSection(RepositoriesView.REMOTE, configName);
try {
config.save();
} catch (IOException e1) {
Activator.handleError(UIText.RepositoriesView_ErrorHeader, e1,