}
protected void execute() throws NoPeerConnectionException, InterruptedException,
InvalidProcessStateException {
IProcessComponent loginProcess = menus
.getNodeMenu()
.getNode()
.getUserManager()
.login(menus.getUserMenu().getUserCredentials(),
menus.getFileMenu().getRootDirectory().toPath());
boolean success = executeBlocking(loginProcess, displayText);
// reset user configs as they might be wrong
if (!success) {
menus.getUserMenu().reset();
menus.getFileMenu().reset();
}
}
});
add(new H2HConsoleMenuItem("Logout") {
protected boolean checkPreconditions() throws Exception {
return checkLogin();
}
protected void execute() throws Exception {
IProcessComponent logoutProcess = menus.getNodeMenu().getNode().getUserManager().logout();
executeBlocking(logoutProcess, displayText);
}
});
add(new H2HConsoleMenuItem("File Menu") {