Skip to content

Commit 15ca0f6

Browse files
Merge pull request #7661 from microsoft/hanli/fixes-202306
Resolve issues for June release
2 parents e5a7ca2 + 6ee701c commit 15ca0f6

File tree

9 files changed

+88
-141
lines changed

9 files changed

+88
-141
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in this file.
44

55
- [Change Log](#change-log)
6+
- [3.78.0](#3780)
67
- [3.77.0](#3770)
78
- [3.76.0](#3760)
89
- [3.75.0](#3750)
@@ -97,6 +98,20 @@ All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in t
9798
- [3.0.7](#307)
9899
- [3.0.6](#306)
99100

101+
## 3.78.0
102+
### Added
103+
- New UX for Azure resource connections in IntelliJ project view
104+
- Support list/add/remove Azure resource connections in project explorer
105+
- Support edit environment variables for Azure resource connections
106+
- Support manage connected Azure resources in project explorer
107+
- Support IntelliJ 2023.2 EAP
108+
109+
### Fixed
110+
- Fix: System environment variables may be missed during function run/deployment
111+
- [#7651](https://github.com/microsoft/azure-tools-for-java/issues/7651): Uncaught Exception DeployFunctionAppAction#update, check if project is a valid function project.
112+
- [#7653](https://github.com/microsoft/azure-tools-for-java/issues/7653): Uncaught Exception com.intellij.diagnostic.PluginException: No display name is specified for configurable com.microsoft.intellij.AzureConfigurable in xml file.
113+
- [#7619](https://github.com/microsoft/azure-tools-for-java/issues/7619): Uncaught Exception Uncaught Exception java.lang.IllegalArgumentException: invalid arguments id/nameId.
114+
100115
## 3.77.0
101116
### Added
102117
- Azure Spring Apps: basic Standard Consumption plan(preview) support.

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice-java/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/action/CreateFunctionAction.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,19 @@ protected boolean isAvailable(final DataContext dataContext) {
132132
if (project == null || project.isDisposed()) {
133133
return false;
134134
}
135-
final IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);
136-
final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex();
137-
if (view != null) {
138-
final List<PsiDirectory> dirs = Arrays.stream(view.getDirectories()).filter(Objects::nonNull).toList();
139-
for (final PsiDirectory dir : dirs) {
140-
if (projectFileIndex.isUnderSourceRootOfType(dir.getVirtualFile(), JavaModuleSourceRootTypes.SOURCES) && doCheckPackageExists(dir)) {
141-
return true;
135+
try {
136+
final IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);
137+
final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex();
138+
if (view != null) {
139+
final List<PsiDirectory> dirs = Arrays.stream(view.getDirectories()).filter(Objects::nonNull).toList();
140+
for (final PsiDirectory dir : dirs) {
141+
if (projectFileIndex.isUnderSourceRootOfType(dir.getVirtualFile(), JavaModuleSourceRootTypes.SOURCES) && doCheckPackageExists(dir)) {
142+
return true;
143+
}
142144
}
143145
}
146+
} catch (final RuntimeException e) {
147+
// swallow exception when check action availability
144148
}
145149
return false;
146150
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice-java/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/runner/core/FunctionUtils.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,17 @@ public static boolean isFunctionProject(Project project) {
180180
return false;
181181
}
182182
final List<Library> libraries = new ArrayList<>();
183-
OrderEnumerator.orderEntries(project).productionOnly().forEachLibrary(library -> {
184-
if (StringUtils.containsAnyIgnoreCase(library.getName(), AZURE_FUNCTIONS_JAVA_LIBRARY, AZURE_FUNCTIONS_JAVA_CORE_LIBRARY)) {
185-
libraries.add(library);
186-
}
187-
return true;
188-
});
189-
return libraries.size() > 0;
183+
try {
184+
OrderEnumerator.orderEntries(project).productionOnly().forEachLibrary(library -> {
185+
if (StringUtils.containsAnyIgnoreCase(library.getName(), AZURE_FUNCTIONS_JAVA_LIBRARY, AZURE_FUNCTIONS_JAVA_CORE_LIBRARY)) {
186+
libraries.add(library);
187+
}
188+
return true;
189+
});
190+
return libraries.size() > 0;
191+
} catch (Throwable t) {
192+
return false;
193+
}
190194
}
191195

192196
@AzureOperation(name = "boundary/function.list_function_methods.module", params = {"module.getName()"})
1.19 MB
Loading

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.md

Lines changed: 17 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1-
<!-- Version: 3.77.0 -->
1+
<!-- Version: 3.78.0 -->
22
# What's new in Azure Toolkit for IntelliJ
33

4+
## 3.78.0
5+
### Added
6+
- New UX for Azure resource connections in IntelliJ project view
7+
- Support list/add/remove Azure resource connections in project explorer
8+
- Support edit environment variables for Azure resource connections
9+
- Support manage connected Azure resources in project explorer
10+
11+
<img alt="app-centric" src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202306/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202306.app-centric.gif" width="1000"/>
12+
- Support IntelliJ 2023.2 EAP
13+
14+
### Fixed
15+
- Fix: System environment variables may be missed during function run/deployment
16+
- [#7651](https://github.com/microsoft/azure-tools-for-java/issues/7651): Uncaught Exception DeployFunctionAppAction#update, check if project is a valid function project.
17+
- [#7653](https://github.com/microsoft/azure-tools-for-java/issues/7653): Uncaught Exception com.intellij.diagnostic.PluginException: No display name is specified for configurable com.microsoft.intellij.AzureConfigurable in xml file.
18+
- [#7619](https://github.com/microsoft/azure-tools-for-java/issues/7619): Uncaught Exception Uncaught Exception java.lang.IllegalArgumentException: invalid arguments id/nameId.
19+
420
## 3.77.0
521
### Added
622
- Azure Spring Apps: basic Standard Consumption plan(preview) support.
@@ -206,102 +222,6 @@
206222
### Changed
207223
- Remove menu `Submit Apache Spark Application`
208224

209-
## 3.68.1
210-
### Fixed
211-
- Fixed the data modification failure issue of `Azure Cosmos DB API for MongoDB` Data Sources.
212-
213-
### Changed
214-
- Added feature toggle for creating Data Source of `Azure Cosmos DB API for Cassandra`, the toggle is **off** by default.
215-
- Support for opening `Azure Cosmos DB API for Cassandra` with `Database and SQL tools` plugin from `Azure Explorer` is disabled by default.
216-
- Support for creating Data Source of the `Azure Cosmos DB API for Cassandra` from `Database and SQL tools` plugin is disabled by default.
217-
218-
## 3.68.0
219-
### Added
220-
- Added support for resource management of `Azure Cosmos DB accounts` in Azure Explorer.
221-
- Added support for resource connection to `Azure Cosmos DB accounts`.
222-
- Added support for creating data source of the Mongo and Cassandra API for `Azure Cosmos DB` from both Azure Explorer and `Database` tool window (`IntelliJ IDEA Ultimate Edition` only).
223-
<img src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202208/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202208.datasource.gif" alt="screenshot of 'cosmos datasource'" width="1200"/>
224-
- Added support for connecting an `Azure Virtual Machine` using SSH directly from an `Azure Virtual Machine` resource node in Azure Explorer.
225-
- Added support for browsing files of an `Azure Virtual Machine` from an `Azure Virtual Machine` resource node in Azure Explorer (`IntelliJ IDEA Ultimate Edition` only).
226-
<img src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202208/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202208.vm.gif" alt="screenshot of 'virtual machine'" width="1200"/>
227-
- Added support for adding dependencies to current local project from `Azure SDK reference book`.
228-
- Added support for jumping to corresponding Azure SDK page in `Azure SDK reference book` from Azure Explorer nodes.
229-
<img src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202208/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202208.sdk.gif" alt="screenshot of 'sdk reference book'" width="1200"/>
230-
- Added support for configuring environment variables when deploy artifacts to an `Azure Web App`.
231-
- Added support for Java 17 for `Azure Functions`.
232-
- Added support for refreshing items (when needed) of combobox components at place.
233-
234-
### Changed
235-
- Default values of most input components in Azure resource creation/deployment dialogs are now learnt from history usage records.
236-
- Local meta-data files of Azure SDK reference book is updated to latest.
237-
238-
### Fixed
239-
- Loading spring apps take more time than normal.
240-
- Creating resources shows repeatedly in ComboBox components sometimes.
241-
- Stopped Azure Function app won't be the default app in deploy dialog.
242-
- App settings of a newly deployed Azure Function app won't be updated in Properties view until sign-out and sign-in again.
243-
- Validation error message doesn't popup when hovering on the input components.
244-
- [#6790](https://github.com/microsoft/azure-tools-for-java/issues/6790): Uncaught Exception com.intellij.serviceContainer.AlreadyDisposedException: Already disposed: Project(*) (disposed)
245-
- [#6784](https://github.com/microsoft/azure-tools-for-java/issues/6784): Uncaught Exception com.intellij.openapi.util.TraceableDisposable$DisposalException: Library LibraryId(*) already disposed
246-
- [#6813](https://github.com/microsoft/azure-tools-for-java/issues/6813): Uncaught Exception com.microsoft.azure.toolkit.lib.common.operation.OperationException: setup run configuration for Azure Functions
247-
248-
## 3.67.0
249-
### Added
250-
- New Azure service support: Azure Kubernetes service.
251-
- direct resource management in Azure Explorer.
252-
- connection to other K8s plugins.
253-
<img src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202207/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202207.k8s.gif" alt="screenshot of 'k8s'" width="1000"/>
254-
- Support for running or debugging local projects directly on Azure Virtual Machine by leveraging [`Run Targets`](https://www.jetbrains.com/help/idea/run-targets.html).
255-
<img src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202207/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202207.runtarget.png" alt="screenshot of 'run target'" width="1000"/>
256-
257-
### Changed
258-
- Most Tool Windows will hide by default and show only when they are triggered by related actions.
259-
- An explicit search box is added on subscription dialog to filter subscriptions more conveniently.
260-
- support for toggling selection of subscriptions by `space` key even checkbox is not focused.
261-
- A loading spinner would show first when the feedback page is loading.
262-
- Entries of some common actions in `<Toolbar>/Tools/Azure` are also added into the gear actions group of Azure Explorer.
263-
264-
### Fixed
265-
- Error occurs if expand or download files/logs of a stopped function app.
266-
- Known CVE issues.
267-
268-
## 3.66.0
269-
### Added
270-
- New "Getting Started with Azure" experience.
271-
<img src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202206/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202206.gettingstarted.gif" alt="screenshot of 'getting started'" width="1000"/>
272-
- Support for IntelliJ IDEA 2022.2(EAP).
273-
- SNAPSHOT and BETA versions of this plugin are available in [`Dev` channel](https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij/versions/dev).
274-
<img src="https://raw.githubusercontent.com/microsoft/azure-tools-for-java/endgame-202206/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/resources/whatsnew.assets/202206.devchannel.png" alt="screenshot of 'dev channel'" width="1000"/>
275-
276-
### Fixed
277-
- Error "java.lang.IllegalStateException" occurs if there are resources having same name but different resource groups.
278-
- Configurations go back to default after deploying an artifact to a newly created Azure Spring App.
279-
- [#6730](https://github.com/microsoft/azure-tools-for-java/issues/6730): Uncaught Exception java.lang.NullPointerException when creating/updating spring cloud app.
280-
- [#6725](https://github.com/microsoft/azure-tools-for-java/issues/6725): Uncaught Exception com.microsoft.azure.toolkit.lib.auth.exception.AzureToolkitAuthenticationException: you are not signed-in. when deploying to Azure Web App.
281-
- [#6696](https://github.com/microsoft/azure-tools-for-java/issues/6696): Unable to run debug on azure java function on intellij (2022.1) with azure toolkit (3.65.1).
282-
- [#6671](https://github.com/microsoft/azure-tools-for-java/issues/6671): Uncaught Exception java.lang.Throwable: Executor with context action id: "RunClass" was already registered!
283-
284-
## 3.65.0
285-
### Added
286-
- New "Provide feedback" experience.
287-
<img src="https://user-images.githubusercontent.com/69189193/171312904-f52d6991-af50-4b81-a4d9-b4186a510e14.png" alt="screenshot of 'provide feedback'" width="1000"/>
288-
- New Azure service support: Azure Application Insights
289-
- direct resource management in Azure Explorer.
290-
- resource connection from both local projects and Azure computing services.
291-
- Enhanced Azure Spring Apps support:
292-
- 0.5Gi memory and 0.5vCPU for all pricing tiers.
293-
- Enterprise tier.
294-
- Double clicking on leaf resource nodes in Azure Explorer will open the resource's properties editor or its portal page if it has no properties editor.
295-
296-
### Changed
297-
- The default titles (i.e. "Azure") of error notifications are removed to make notification more compact.
298-
299-
### Fixed
300-
- Log/notification contains message related to deployment even if user is only creating a spring app.
301-
- Display of Azure Explorer get messed up sometimes after restarting IDE.
302-
- [#6634](https://github.com/microsoft/azure-tools-for-java/issues/6634): ArrayIndexOutOfBoundsException when initializing Azure Explorer.
303-
- [#6550](https://github.com/microsoft/azure-tools-for-java/issues/6550): Uncaught Exception com.intellij.diagnostic.PluginException: User data is not supported.
304-
305225
## Summary
306226

307227
The plugin allows Java developers to easily develop, configure, test, and deploy highly available and scalable Java web apps. It also supports Azure Synapse data engineers, Azure HDInsight developers and Apache Spark on SQL Server users to create, test and submit Apache Spark/Hadoop jobs to Azure from IntelliJ on all supported platforms.

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-resource-connector-lib/src/main/java/com/microsoft/azure/toolkit/intellij/facet/AzureFacet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static void addTo(@Nonnull final Module module) {
4646
properties.setValue(key, true);
4747
ProjectView.getInstance(module.getProject()).getCurrentProjectViewPane().updateFromRoot(true);
4848
}
49+
ProjectView.getInstance(module.getProject()).getCurrentProjectViewPane().updateFromRoot(true);
4950
}
5051

5152
public static boolean wasEverAddedTo(@Nonnull final Module module) {

PluginsAndFeatures/azure-toolkit-for-intellij/src/main/java/com/microsoft/intellij/util/PluginUtil.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import lombok.extern.slf4j.Slf4j;
3434
import org.apache.commons.lang3.ArrayUtils;
3535

36+
import javax.annotation.Nullable;
3637
import javax.swing.Icon;
3738

3839
import java.io.File;
@@ -87,10 +88,15 @@ public static Module getSelectedModule() {
8788
return DataKeys.MODULE.getData(dataContext);
8889
}
8990

91+
@Nullable
9092
public static String getModulePath(Module module) {
91-
return Optional.of(ModuleRootManager.getInstance(module).getContentRoots())
92-
.filter(ArrayUtils::isNotEmpty)
93-
.map(array -> array[0].getPath()).orElse(null);
93+
try {
94+
return Optional.of(ModuleRootManager.getInstance(module).getContentRoots())
95+
.filter(ArrayUtils::isNotEmpty)
96+
.map(array -> array[0].getPath()).orElse(null);
97+
} catch (Exception e) {
98+
return null;
99+
}
94100
}
95101

96102
/**

PluginsAndFeatures/azure-toolkit-for-intellij/src/main/kotlin/com/microsoft/intellij/feedback/MSErrorReportHandler.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import com.intellij.openapi.diagnostic.ErrorReportSubmitter
2626
import com.intellij.openapi.diagnostic.IdeaLoggingEvent
2727
import com.intellij.openapi.diagnostic.SubmittedReportInfo
2828
import com.intellij.util.Consumer
29+
import com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemetryClient
2930
import com.microsoft.azuretools.telemetry.TelemetryConstants
3031
import com.microsoft.azuretools.telemetrywrapper.ErrorType
3132
import com.microsoft.azuretools.telemetrywrapper.EventUtil
@@ -128,5 +129,6 @@ fun filterMSCallStacks(callStacks: String): String {
128129

129130
false
130131
}
132+
.map { line -> AzureTelemetryClient.anonymizePiiData(line) }
131133
.joinToString("\n")
132134
}

0 commit comments

Comments
 (0)