if (root.nodeExists(nodename)) {
myPassword = node.get("password", null);
myLogin = node.get("login", null);
}
if (myPassword == null) {
PasswordDialog dialog = new PasswordDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
if (myLogin != null)
dialog.setUser(myLogin);
dialog.sethost(host);
// get the new values from the dialog
if (dialog.open() == Window.OK) {
myLogin = dialog.getUser();
myPassword = dialog.getPassword();
node.put("login", myLogin, false);
node.put("password", myPassword, true);
} else {
return false;
}