use of nl.tudelft.watchdog.eclipse.ui.preferences.Preferences in project watchdog by TestRoots.
the class RegistrationWizardBase method performFinish.
@Override
public boolean performFinish() {
Preferences preferences = Preferences.getInstance();
preferences.registerProjectId(WatchDogUtils.getWorkspaceName(), projectId);
preferences.registerProjectUse(WatchDogUtils.getWorkspaceName(), true);
StartupHandler.startWatchDog();
return true;
}
use of nl.tudelft.watchdog.eclipse.ui.preferences.Preferences in project watchdog by TestRoots.
the class UserRegistrationPage method makeRegistration.
protected void makeRegistration() {
User user = new User();
user.email = getEmailInput().getText();
user.organization = getOrganizationInput().getText();
user.mayContactUser = getMayContactUser();
user.programmingExperience = getProgrammingExperience();
user.operatingSystem = Platform.getOS();
try {
id = new JsonTransferer().registerNewUser(user);
} catch (ServerCommunicationException exception) {
successfulRegistration = false;
messageTitle = "Problem creating new user!";
messageBody = WordUtils.wrap(exception.getMessage(), 100, null, true);
messageBody += "\nAre you connected to the internet, and is port 80 open?";
messageBody += "\nPlease contact us via www.testroots.org. \nWe'll troubleshoot the issue!";
return;
}
successfulRegistration = true;
((UserProjectRegistrationWizard) getWizard()).userid = id;
messageTitle = "New user registered!";
messageBody = "Your new user id is registered: ";
Preferences preferences = Preferences.getInstance();
preferences.setUserId(id);
preferences.registerProjectId(WatchDogUtils.getWorkspaceName(), "");
preferences.setProgrammingExperience(user.programmingExperience);
}
use of nl.tudelft.watchdog.eclipse.ui.preferences.Preferences in project watchdog by TestRoots.
the class InfoHandler method updateElement.
@Override
public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map parameters) {
if (WatchDogGlobals.isActive) {
Preferences preferences = Preferences.getInstance();
displayUpdateQuestionDialog(preferences);
if (WatchDogGlobals.lastTransactionFailed || preferences.isOldVersion()) {
element.setTooltip(WatchDogGlobals.ACTIVE_WATCHDOG_TEXT);
element.setIcon(UIUtils.WATCHDOG_ICON_WARNING);
} else {
element.setTooltip(WatchDogGlobals.ACTIVE_WATCHDOG_TEXT);
element.setIcon(UIUtils.WATCHDOG_ICON);
}
if (!preferences.isOldVersion()) {
preferences.setBigUpdateAnswered(false);
}
} else {
element.setTooltip(WatchDogGlobals.INACTIVE_WATCHDOG_TEXT);
element.setIcon(UIUtils.WATCHDOG_ICON_DISABLED);
}
}
Aggregations