Search in sources :

Example 1 with CreateDeploymentForm

use of com.microsoft.azure.toolkit.intellij.arm.CreateDeploymentForm in project azure-tools-for-java by Microsoft.

the class CreateDeploymentAction method doActionPerformed.

private void doActionPerformed(NodeActionEvent e, boolean isLoggedIn, Project project) {
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
    try {
        if (isLoggedIn) {
            if (!AzureLoginHelper.isAzureSubsAvailableOrReportError(ERROR_CREATING_DEPLOYMENT)) {
                return;
            }
            CreateDeploymentForm createDeploymentForm = new CreateDeploymentForm(project);
            if (node instanceof ResourceManagementNode) {
                ResourceManagementNode rmNode = (ResourceManagementNode) node;
                createDeploymentForm.fillSubsAndRg(rmNode);
            }
            createDeploymentForm.show();
        }
    } catch (Exception ex) {
        AzurePlugin.log(ERROR_CREATING_DEPLOYMENT, ex);
        UIUtils.showNotification(statusBar, NOTIFY_CREATE_DEPLOYMENT_FAIL + ", " + ex.getMessage(), MessageType.ERROR);
    }
}
Also used : ResourceManagementNode(com.microsoft.tooling.msservices.serviceexplorer.azure.arm.ResourceManagementNode) CreateDeploymentForm(com.microsoft.azure.toolkit.intellij.arm.CreateDeploymentForm) StatusBar(com.intellij.openapi.wm.StatusBar)

Aggregations

StatusBar (com.intellij.openapi.wm.StatusBar)1 CreateDeploymentForm (com.microsoft.azure.toolkit.intellij.arm.CreateDeploymentForm)1 ResourceManagementNode (com.microsoft.tooling.msservices.serviceexplorer.azure.arm.ResourceManagementNode)1