|
16 | 16 | import com.intellij.execution.ui.ConsoleView; |
17 | 17 | import com.intellij.execution.ui.ConsoleViewContentType; |
18 | 18 | import com.intellij.openapi.project.Project; |
19 | | -import com.intellij.openapi.vfs.VfsUtil; |
20 | 19 | import com.microsoft.azure.toolkit.ide.springcloud.SpringCloudActionsContributor; |
21 | 20 | import com.microsoft.azure.toolkit.intellij.common.RunProcessHandler; |
22 | 21 | import com.microsoft.azure.toolkit.intellij.common.messager.IntellijAzureMessager; |
@@ -105,12 +104,12 @@ public void processTerminated(@Nonnull ProcessEvent event) { |
105 | 104 | return new DefaultExecutionResult(consoleView, processHandler); |
106 | 105 | } |
107 | 106 |
|
108 | | - @AzureOperation(name = "user/springcloud.deploy_app.app", params = {"this.config.getAppConfig().getAppName()"}) |
| 107 | + @AzureOperation(name = "user/springcloud.deploy_app.app", params = {"this.config.getApp().getName()"}) |
109 | 108 | public SpringCloudDeployment execute(IAzureMessager messager) { |
110 | 109 | OperationContext.current().setMessager(messager); |
111 | 110 | OperationContext.current().setTelemetryProperties(getTelemetryProperties()); |
112 | 111 | final SpringCloudDeploymentDraft deployment = this.config.getDeployment(); |
113 | | - final Optional<File> opFile = Optional.ofNullable(deployment.getArtifact()).map(IArtifact::getFile); |
| 112 | + final Optional<File> opFile = Optional.ofNullable(deployment).map(SpringCloudDeploymentDraft::getArtifact).map(IArtifact::getFile); |
114 | 113 | final Action.Id<Void> REOPEN = Action.Id.of("user/springcloud.reopen_deploy_dialog"); |
115 | 114 | final Action<Void> reopen = new Action<>(REOPEN).withHandler((v) -> DeploySpringCloudAppAction.deploy(this.config, this.project)); |
116 | 115 | if (opFile.isEmpty() || opFile.filter(File::exists).isEmpty()) { |
@@ -196,7 +195,7 @@ private void waitUntilAppReady(SpringCloudDeployment springCloudDeployment) { |
196 | 195 |
|
197 | 196 | protected Map<String, String> getTelemetryProperties() { |
198 | 197 | final Map<String, String> props = new HashMap<>(); |
199 | | - final SpringCloudDeploymentDraft deployment = config.getDeployment(); |
| 198 | + final SpringCloudDeploymentDraft deployment = Objects.requireNonNull(config.getDeployment()); |
200 | 199 | props.put("runtime", String.valueOf(deployment.getRuntimeVersion())); |
201 | 200 | props.put("subscriptionId", deployment.getSubscriptionId()); |
202 | 201 | props.put("public", String.valueOf(deployment.getParent().isPublicEndpointEnabled())); |
|
0 commit comments