Skip to content

Commit 627c758

Browse files
committed
Migrate LinkAzureServiceRunConfigurationExtension to EAP interface
1 parent 522e7c1 commit 627c758

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/LinkAzureServiceRunConfigurationExtension.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
public class LinkAzureServiceRunConfigurationExtension extends RunConfigurationExtension {
1919

2020
@Override
21-
public <T extends RunConfigurationBase> void updateJavaParameters(@NotNull T t, @NotNull JavaParameters javaParameters,
22-
RunnerSettings runnerSettings) throws ExecutionException {
21+
public boolean isApplicableFor(@NotNull RunConfigurationBase<?> runConfigurationBase) {
22+
Boolean linkAzureService = runConfigurationBase.getUserData(LinkAzureServiceBeforeRunProvider.LINK_AZURE_SERVICE);
23+
return Boolean.TRUE.equals(linkAzureService);
24+
}
25+
26+
@Override
27+
public <T extends RunConfigurationBase<?>> void updateJavaParameters(@NotNull final T t,
28+
@NotNull final JavaParameters javaParameters,
29+
final RunnerSettings runnerSettings)
30+
throws ExecutionException {
2331
Boolean linkAzureServiceFlag = t.getUserData(LinkAzureServiceBeforeRunProvider.LINK_AZURE_SERVICE);
2432
Map<String, String> envMap = t.getUserData(LinkAzureServiceBeforeRunProvider.LINK_AZURE_SERVICE_ENVS);
2533
if (Boolean.TRUE.equals(linkAzureServiceFlag) && MapUtils.isNotEmpty(envMap)) {
@@ -28,10 +36,4 @@ public <T extends RunConfigurationBase> void updateJavaParameters(@NotNull T t,
2836
}
2937
}
3038
}
31-
32-
@Override
33-
public boolean isApplicableFor(@NotNull RunConfigurationBase<?> runConfigurationBase) {
34-
Boolean linkAzureService = runConfigurationBase.getUserData(LinkAzureServiceBeforeRunProvider.LINK_AZURE_SERVICE);
35-
return Boolean.TRUE.equals(linkAzureService);
36-
}
3739
}

0 commit comments

Comments
 (0)