initializeSelection(event);
IServerWorkingCopy wc = selectedServer.createWorkingCopy();
final CloudFoundryServer cfServer = (CloudFoundryServer) wc.loadAdapter(CloudFoundryServer.class, null);
final UpdatePasswordDialog dialog = new UpdatePasswordDialog(Display.getDefault().getActiveShell(), cfServer.getUsername());
if (dialog.open() == IDialogConstants.OK_ID) {
String errorMsg = CloudUiUtil.updatePassword(dialog.getPassword(), cfServer, wc);
if (errorMsg != null) {
MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.UpdatePasswordCommand_TEXT_PW_UPDATE, NLS.bind(Messages.UpdatePasswordCommand_ERROR_PW_UPDATE_BODY, errorMsg));
} else {
MessageDialog.openInformation(Display.getDefault().getActiveShell(), Messages.UpdatePasswordCommand_TEXT_PW_UPDATE, Messages.UpdatePasswordCommand_TEXT_PW_UPDATE_SUCC);