Search in sources :

Example 1 with UserProjectRegistrationWizard

use of nl.tudelft.watchdog.intellij.ui.wizards.userregistration.UserProjectRegistrationWizard in project watchdog by TestRoots.

the class WatchDogStartUp method checkWhetherToDisplayUserProjectRegistrationWizard.

/**
 * Checks whether there is a registered WatchDog user
 */
private void checkWhetherToDisplayUserProjectRegistrationWizard() {
    Preferences preferences = Preferences.getInstance();
    ProjectPreferenceSetting projectSetting = preferences.getOrCreateProjectSetting(project.getName());
    if (!WatchDogUtils.isEmpty(WatchDogGlobals.getPreferences().getUserId()) || (projectSetting.startupQuestionAsked && !projectSetting.enableWatchdog)) {
        return;
    }
    UserProjectRegistrationWizard wizard = new UserProjectRegistrationWizard("User and Project Registration", project);
    wizard.show();
    if (wizard.getExitCode() == DialogWrapper.CANCEL_EXIT_CODE) {
        if (Messages.YES == Messages.showYesNoDialog(WATCHDOG_UNREGISTERED_WARNING, "WatchDog is not registered!", Messages.getQuestionIcon())) {
            makeSilentRegistration();
        } else {
            userProjectRegistrationCancelled = true;
            preferences.registerProjectUse(project.getName(), false);
        }
    }
}
Also used : Preferences(nl.tudelft.watchdog.intellij.ui.preferences.Preferences) ProjectPreferenceSetting(nl.tudelft.watchdog.core.ui.preferences.ProjectPreferenceSetting) UserProjectRegistrationWizard(nl.tudelft.watchdog.intellij.ui.wizards.userregistration.UserProjectRegistrationWizard)

Example 2 with UserProjectRegistrationWizard

use of nl.tudelft.watchdog.intellij.ui.wizards.userregistration.UserProjectRegistrationWizard in project watchdog by TestRoots.

the class ProjectCreatedEndingStep method createPageContent.

private void createPageContent(JPanel parent) {
    if (isThisProjectWizard()) {
        createProjectRegistrationSummary(parent);
    } else {
        UserProjectRegistrationWizard wizard = (UserProjectRegistrationWizard) getWizard();
        UserRegistrationStep userRegistrationStep = wizard.userRegistrationStep;
        if (wizard.userWelcomeStep.getRegisterNewId()) {
            createDebugSurveyInfo(parent);
            userRegistrationStep.createUserRegistrationSummary(parent);
        }
        createProjectRegistrationSummary(parent);
    }
}
Also used : UserRegistrationStep(nl.tudelft.watchdog.intellij.ui.wizards.userregistration.UserRegistrationStep) UserProjectRegistrationWizard(nl.tudelft.watchdog.intellij.ui.wizards.userregistration.UserProjectRegistrationWizard)

Aggregations

UserProjectRegistrationWizard (nl.tudelft.watchdog.intellij.ui.wizards.userregistration.UserProjectRegistrationWizard)2 ProjectPreferenceSetting (nl.tudelft.watchdog.core.ui.preferences.ProjectPreferenceSetting)1 Preferences (nl.tudelft.watchdog.intellij.ui.preferences.Preferences)1 UserRegistrationStep (nl.tudelft.watchdog.intellij.ui.wizards.userregistration.UserRegistrationStep)1