Example usage for com.intellij.openapi.ui DialogWrapper OK_EXIT_CODE

List of usage examples for com.intellij.openapi.ui DialogWrapper OK_EXIT_CODE

Introduction

In this page you can find the example usage for com.intellij.openapi.ui DialogWrapper OK_EXIT_CODE.

Prototype

int OK_EXIT_CODE

To view the source code for com.intellij.openapi.ui DialogWrapper OK_EXIT_CODE.

Click Source Link

Document

The default exit code for "OK" action.

Usage

From source file:com.microsoft.azure.hdinsight.serverexplore.UI.UploadBlobFileForm.java

License:Open Source License

@Override
protected void doOKAction() {

    try {// www . ja v a  2  s  . c  o  m
        folder = new URI(null, null, folder, null).getPath();
    } catch (URISyntaxException ignore) {
    }

    uploadSelected.run();

    close(DialogWrapper.OK_EXIT_CODE, true);
}

From source file:com.microsoft.azuretools.ijidea.ui.AppServiceChangeSettingsDialog.java

License:Open Source License

public static AppServiceChangeSettingsDialog go(WebAppDetails wad, Project project) {
    AppServiceChangeSettingsDialog d = new AppServiceChangeSettingsDialog(project, wad);
    d.show();/* w ww  .j a  v a 2s  . c  o  m*/
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }
    return null;
}

From source file:com.microsoft.azuretools.ijidea.ui.AppServiceCreateDialog.java

License:Open Source License

public static AppServiceCreateDialog go(Project project) {
    AppServiceCreateDialog d = new AppServiceCreateDialog(project);
    d.show();/*  ww w .  jav  a2  s  .com*/
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }
    return null;
}

From source file:com.microsoft.azuretools.ijidea.ui.SignInWindow.java

License:Open Source License

public static SignInWindow go(AuthMethodDetails authMethodDetails, Project project) {
    SignInWindow d = new SignInWindow(authMethodDetails, project);
    d.show();/*from ww w  .  j a  va 2 s. c o  m*/
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }

    return null;
}

From source file:com.microsoft.azuretools.ijidea.ui.SrvPriCreationStatusDialog.java

License:Open Source License

public static SrvPriCreationStatusDialog go(Map<String, List<String>> tidSidsMap, String destinationFolder,
        Project project) {/*w w  w.  j  a va  2s. c  o  m*/
    SrvPriCreationStatusDialog d = new SrvPriCreationStatusDialog(project);
    d.tidSidsMap = tidSidsMap;
    d.destinationFolder = destinationFolder;
    d.show();
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }

    return null;
}

From source file:com.microsoft.azuretools.ijidea.ui.SrvPriSettingsDialog.java

License:Open Source License

public static SrvPriSettingsDialog go(List<SubscriptionDetail> sdl, Project project) throws Exception {
    SrvPriSettingsDialog d = new SrvPriSettingsDialog(sdl, project);
    d.show();/*ww  w.  j av a  2 s .c om*/
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }

    return null;
}

From source file:com.microsoft.azuretools.ijidea.ui.SubscriptionsDialog.java

License:Open Source License

public static SubscriptionsDialog go(List<SubscriptionDetail> sdl, Project project) throws Exception {
    SubscriptionsDialog d = new SubscriptionsDialog(sdl, project);
    d.show();//from ww  w . ja  v a 2 s.  co  m
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }

    return null;
}

From source file:com.microsoft.azuretools.ijidea.ui.WarSelectDialog.java

License:Open Source License

public static WarSelectDialog go(@Nullable Project project, List<Artifact> artifactList) {
    WarSelectDialog d = new WarSelectDialog(project, artifactList);
    d.artifactList = artifactList;//from  w ww.  j  a  va 2  s.c  o m
    d.show();
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }

    return null;
}

From source file:com.microsoft.azuretools.ijidea.ui.WebAppDeployDialog.java

License:Open Source License

public static WebAppDeployDialog go(Project project, Artifact artifact) {
    WebAppDeployDialog d = new WebAppDeployDialog(project, artifact);
    d.show();//from w w  w .j a  va  2 s.  com
    if (d.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
        return d;
    }

    return null;
}

From source file:com.microsoft.intellij.actions.AzureDockerHostDeployAction.java

License:Open Source License

public void onActionPerformed(AnActionEvent actionEvent) {
    try {/*w ww  .  j  a  va2  s  . c  o m*/
        Project project = getCurrentProject();
        if (!AzureSignInAction.doSignIn(AuthMethodManager.getInstance(), project))
            return;
        AzureDockerUIResources.CANCELED = false;

        Module module = PluginUtil.getSelectedModule();
        List<Module> modules = Arrays.asList(ModuleManager.getInstance(project).getModules());

        if (module == null && modules.isEmpty()) {
            Messages.showErrorDialog(message("noModule"), message("error"));
        } else if (module == null) {
            module = modules.iterator().next();
        }

        AzureManager azureAuthManager = AuthMethodManager.getInstance().getAzureManager();
        // not signed in
        if (azureAuthManager == null) {
            System.out.println("ERROR! Not signed in!");
            return;
        }

        AzureDockerHostsManager dockerManager = AzureDockerHostsManager
                .getAzureDockerHostsManagerEmpty(azureAuthManager);

        if (!dockerManager.isInitialized()) {
            AzureDockerUIResources.updateAzureResourcesWithProgressDialog(project);
            if (AzureDockerUIResources.CANCELED) {
                return;
            }
        }

        if (dockerManager.getSubscriptionsMap().isEmpty()) {
            PluginUtil.displayErrorDialog("Publish Docker Container", "Please select a subscription first");
            return;
        }

        DockerHost dockerHost = (dockerManager.getDockerPreferredSettings() != null)
                ? dockerManager.getDockerHostForURL(dockerManager.getDockerPreferredSettings().dockerApiName)
                : null;
        AzureDockerImageInstance dockerImageDescription = dockerManager
                .getDefaultDockerImageDescription(project.getName(), dockerHost);

        AzureSelectDockerWizardModel model = new AzureSelectDockerWizardModel(project, dockerManager,
                dockerImageDescription);
        AzureSelectDockerWizardDialog wizard = new AzureSelectDockerWizardDialog(model);
        if (dockerHost != null) {
            model.selectDefaultDockerHost(dockerHost, true);
        }
        wizard.show();

        if (wizard.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
            try {
                String url = wizard.deploy();
                System.out.println("Web app published at: " + url);
            } catch (Exception ex) {
                PluginUtil.displayErrorDialogAndLog(message("webAppDplyErr"), ex.getMessage(), ex);
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}