use of com.cubrid.cubridmanager.ui.host.dialog.ChangePasswordDialog in project cubrid-manager by CUBRID.
the class ChangeManagerPasswordAction method run.
/**
* Open change password dialog and change CUBRID Manager user password
*/
public void run() {
final Object[] obj = this.getSelectedObj();
if (!isSupported(obj[0])) {
return;
}
ICubridNode node = (ICubridNode) obj[0];
CubridServer server = node.getServer();
ChangePasswordDialog changePasswordDialog = new ChangePasswordDialog(getShell(), false);
changePasswordDialog.setServerInfo(server.getServerInfo());
ISelectionProvider provider = this.getSelectionProvider();
if (IDialogConstants.OK_ID == changePasswordDialog.open() && provider instanceof TreeViewer) {
TreeViewer viewer = (TreeViewer) provider;
boolean isContinue = HostUtils.processHostDisconnected(server);
if (isContinue) {
viewer.refresh(server, true);
ActionManager.getInstance().fireSelectionChanged(getSelection());
CubridNodeManager.getInstance().fireCubridNodeChanged(new CubridNodeChangedEvent(server, CubridNodeChangedEventType.SERVER_DISCONNECTED));
}
}
}
Aggregations