Skip to content

Commit

Permalink
Support 2021.3 EAP1 (#521)
Browse files Browse the repository at this point in the history
* Support 2021.3 EAP1 #520

* Update idea plugin compilation issues

* IDEA-278616 Temporary workaround for classloader problem.
  • Loading branch information
maartenba authored Sep 29, 2021
1 parent 1bf15da commit 048938f
Show file tree
Hide file tree
Showing 24 changed files with 86 additions and 93 deletions.
8 changes: 4 additions & 4 deletions BuildPlugin
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ tc_open "Initializing build script"

INJECT_INTELLIJ_VERSION=false

IJ_VERSION_MAJOR_BUILD=212
IJ_VERSION_MAJOR=2021.2
IJ_VERSION_MAJOR_BUILD=213
IJ_VERSION_MAJOR=2021.3
IJ_VERSION_MINOR=
IJ_VERSION_LATEST=$IJ_VERSION_MAJOR.$IJ_VERSION_MINOR \
&& [[ -z $IJ_VERSION_MINOR ]] && IJ_VERSION_LATEST=$IJ_VERSION_MAJOR
IJ_SCALA_VERSION_LATEST=2021.2.13
IJ_SCALA_VERSION_LATEST=2021.3.3

while getopts ":hqvBC:e:" option; do
case $option in
Expand All @@ -58,7 +58,7 @@ tc_open "Initializing build script"
esac
done

BUILD_NUMBER="3.50.0.$BUILD_COUNTER-2021.2"
BUILD_NUMBER="3.50.0.$BUILD_COUNTER-2021.3"
BUILD_CONFIGURATION=Release

MAVEN_LOCAL_DIR="$SCRIPTPATH"/.repository
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ javaVersion=11
org.gradle.jvmargs='-Duser.language=en'
sources=false

intellij_version=IC-212.4638.7-EAP-SNAPSHOT
rider_version=RD-2021.2-EAP9-SNAPSHOT
intellij_version=IC-213.3714-EAP-CANDIDATE-SNAPSHOT
rider_version=RD-2021.3-EAP1-SNAPSHOT
build_common_code_with=rider

intellij_plugin_name=azure-toolkit-for-intellij
rider_plugin_name=azure-toolkit-for-rider
rider_backend_build_configuration=Debug

dep_plugins=org.intellij.scala:2021.2.13
dep_plugins=org.intellij.scala:2021.3.3
applicationinsights.key=57cc111a-36a8-44b3-b044-25d293b8b77c

updateVersionRange=false
patchPluginXmlSinceBuild=212
patchPluginXmlSinceBuild=213

kotlin_version=1.4.32
jackson_kotlin_version=2.12.0
gradle_plugin_version=1.1.4
gradle_plugin_version=1.1.6
undercouch_version=4.0.4
web_socket_version=1.5.1
retrofit_version=2.9.0
Expand All @@ -29,6 +29,6 @@ lombok_version=1.18.8
aspectj_version=5.3.0

rd_version=0.212.318
rider_nuget_sdk_version=2021.2.0-eap09
rider_nuget_sdk_version=2021.3.0-eap01

rider_test_local_env_run=true
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.LibraryOrderEntry;
import com.intellij.openapi.roots.ModifiableRootModel;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.roots.OrderEntry;
import com.intellij.openapi.roots.impl.ModuleLibraryOrderEntryImpl;
import com.intellij.openapi.roots.impl.OrderEntryUtil;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.ui.OrderRoot;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
Expand Down Expand Up @@ -274,9 +275,11 @@ private void handleAppInsightsXML() throws Exception {
private void configureAzureSDK() {
final ModifiableRootModel modifiableModel = ModuleRootManager.getInstance(module).getModifiableModel();
for (OrderEntry orderEntry : modifiableModel.getOrderEntries()) {
if (orderEntry instanceof ModuleLibraryOrderEntryImpl
&& AzureLibrary.APP_INSIGHTS.getName().equals(((ModuleLibraryOrderEntryImpl) orderEntry).getLibraryName())) {
return;
if (orderEntry instanceof LibraryOrderEntry && OrderEntryUtil.isModuleLibraryOrderEntry(orderEntry)) {
final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)orderEntry;
if (AzureLibrary.APP_INSIGHTS.getName().equals(libraryEntry.getLibraryName())) {
return;
}
}
}

Expand All @@ -285,10 +288,12 @@ private void configureAzureSDK() {
try {
Library newLibrary = LibrariesContainerFactory.createContainer(modifiableModel).createLibrary(AzureLibrary.APP_INSIGHTS.getName(), level, new ArrayList<OrderRoot>());
for (OrderEntry orderEntry : modifiableModel.getOrderEntries()) {
if (orderEntry instanceof ModuleLibraryOrderEntryImpl
&& AzureLibrary.APP_INSIGHTS.getName().equals(((ModuleLibraryOrderEntryImpl) orderEntry).getLibraryName())) {
((ModuleLibraryOrderEntryImpl) orderEntry).setExported(true);
break;
if (orderEntry instanceof LibraryOrderEntry && OrderEntryUtil.isModuleLibraryOrderEntry(orderEntry)) {
final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)orderEntry;
if (AzureLibrary.APP_INSIGHTS.getName().equals(libraryEntry.getLibraryName())) {
libraryEntry.setExported(true);
break;
}
}
}
Library.ModifiableModel newLibraryModel = newLibrary.getModifiableModel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import com.intellij.openapi.application.AccessToken;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.roots.LibraryOrderEntry;
import com.intellij.openapi.roots.ModifiableRootModel;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.roots.OrderEntry;
import com.intellij.openapi.roots.impl.ModuleLibraryOrderEntryImpl;
import com.intellij.openapi.roots.impl.OrderEntryUtil;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.ui.OrderRoot;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
Expand Down Expand Up @@ -110,21 +111,25 @@ private void addLibrary() {
try {
final ModifiableRootModel modifiableModel = ModuleRootManager.getInstance(module).getModifiableModel();
for (OrderEntry orderEntry : modifiableModel.getOrderEntries()) {
if (orderEntry instanceof ModuleLibraryOrderEntryImpl
&& azureLibrary.getName().equals(((ModuleLibraryOrderEntryImpl) orderEntry).getLibraryName())) {
AzureTaskManager.getInstance().runLater(() -> PluginUtil.displayErrorDialog(message(
"error"), message("libraryExistsError")));
return;
if (orderEntry instanceof LibraryOrderEntry && OrderEntryUtil.isModuleLibraryOrderEntry(orderEntry)) {
final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)orderEntry;
if (azureLibrary.getName().equals(libraryEntry.getLibraryName())) {
AzureTaskManager.getInstance().runLater(() -> PluginUtil.displayErrorDialog(message(
"error"), message("libraryExistsError")));
return;
}
}
}

Library newLibrary = LibrariesContainerFactory.createContainer(modifiableModel).createLibrary(azureLibrary.getName(), level, new ArrayList<OrderRoot>());
if (model.isExported()) {
for (OrderEntry orderEntry : modifiableModel.getOrderEntries()) {
if (orderEntry instanceof ModuleLibraryOrderEntryImpl
&& azureLibrary.getName().equals(((ModuleLibraryOrderEntryImpl) orderEntry).getLibraryName())) {
((ModuleLibraryOrderEntryImpl) orderEntry).setExported(true);
break;
if (orderEntry instanceof LibraryOrderEntry && OrderEntryUtil.isModuleLibraryOrderEntry(orderEntry)) {
final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)orderEntry;
if (azureLibrary.getName().equals(libraryEntry.getLibraryName())) {
libraryEntry.setExported(true);
break;
}
}
}
}
Expand Down Expand Up @@ -170,21 +175,23 @@ private void editLibrary() {
final ModifiableRootModel modifiableModel = ModuleRootManager.getInstance(module).getModifiableModel();
OrderEntry libraryOrderEntry = null;
for (OrderEntry orderEntry : modifiableModel.getOrderEntries()) {
if (orderEntry instanceof ModuleLibraryOrderEntryImpl
&& azureLibrary.getName().equals(((ModuleLibraryOrderEntryImpl) orderEntry).getLibraryName())) {
libraryOrderEntry = orderEntry;
break;
if (orderEntry instanceof LibraryOrderEntry && OrderEntryUtil.isModuleLibraryOrderEntry(orderEntry)) {
final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)orderEntry;
if (azureLibrary.getName().equals(libraryEntry.getLibraryName())) {
libraryOrderEntry = orderEntry;
break;
}
}
}
if (libraryOrderEntry != null) {
LibraryPropertiesPanel libraryPropertiesPanel = new LibraryPropertiesPanel(module, azureLibrary, true,
((ModuleLibraryOrderEntryImpl) libraryOrderEntry).isExported());
((LibraryOrderEntry) libraryOrderEntry).isExported());
DefaultDialogWrapper libraryProperties = new DefaultDialogWrapper(module.getProject(), libraryPropertiesPanel);
libraryProperties.show();
if (libraryProperties.isOK()) {
AccessToken token = WriteAction.start();
try {
((ModuleLibraryOrderEntryImpl) libraryOrderEntry).setExported(libraryPropertiesPanel.isExported());
((LibraryOrderEntry) libraryOrderEntry).setExported(libraryPropertiesPanel.isExported());
modifiableModel.commit();
} finally {
token.finish();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
<html>
<h4>Added:</h4>
<ul>
<li>Compatibility with Rider 2021.2 EAP 9</li>
</ul>
<h4>Fixed:</h4>
<ul>
<li>Failures on trying to login to Azure account (<a href="https://youtrack.jetbrains.com/issue/RIDER-65794">RIDER-65794</a>)</li>
<li>Azure Functions - Hide "Use external console for Isolated worker (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/504">#504</a>)</li>
<li>Unable to login through Settings | Tools | Azure | Service Authentication (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/518">#518</a>)</li>
<li>Compatibility with Rider 2021.3 EAP1</li>
</ul>
</html>
]]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ task integrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath

jvmArgs '--illegal-access=warn'
jvmArgs '--illegal-access=warn', '-Didea.force.use.core.classloader=true'

testLogging {
showStandardStreams = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<change-notes>
<![CDATA[
<html>
<p>[3.50.0-2021.3]</p>
<ul>
<li>Compatibility with Rider 2021.3 EAP1</li>
</ul>
<p>[3.50.1-2021.2]</p>
<ul>
<li>Compatibility with Rider 2021.2</li>
Expand Down Expand Up @@ -198,7 +202,7 @@
<xi:include href="/META-INF/platformPlugin.xml" xpointer="xpointer(/idea-plugin/*)"/>

<!-- please see https://confluence.jetbrains.com/display/IDEADEV/Build+Number+Ranges for description -->
<idea-version since-build="212" until-build="212.*"/>
<idea-version since-build="213" until-build="213.*"/>

<resource-bundle>messages.RiderAzureMessages</resource-bundle>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/**
* Copyright (c) 2018-2020 JetBrains s.r.o.
* <p/>
* Copyright (c) 2018-2021 JetBrains s.r.o.
*
* All rights reserved.
* <p/>
*
* MIT License
* <p/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* <p/>
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
* <p/>
*
* THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
Expand All @@ -26,7 +26,7 @@ import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.jetbrains.rd.platform.util.application
import com.intellij.util.application
import com.jetbrains.rd.util.lifetime.Lifetime
import com.jetbrains.rd.util.lifetime.isAlive
import com.jetbrains.rd.util.reactive.Signal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.wm.ToolWindowId
import com.intellij.openapi.wm.ToolWindowManager
import com.intellij.util.application
import com.intellij.util.io.ZipUtil
import com.jetbrains.rd.platform.util.application
import com.jetbrains.rd.util.spinUntil
import com.jetbrains.rd.util.threading.SpinWait
import com.jetbrains.rdclient.util.idea.toIOFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
package com.microsoft.intellij.runner.appbase.config.ui

import com.intellij.openapi.project.Project
import com.jetbrains.rd.platform.util.application
import com.intellij.util.application
import com.jetbrains.rd.util.lifetime.Lifetime
import com.jetbrains.rd.util.lifetime.isAlive
import com.jetbrains.rd.util.reactive.Signal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2019-2020 JetBrains s.r.o.
* Copyright (c) 2019-2021 JetBrains s.r.o.
*
* All rights reserved.
*
Expand All @@ -25,7 +25,7 @@ package com.microsoft.intellij.runner.functionapp.model
import com.intellij.openapi.project.Project
import com.intellij.openapi.rd.createLifetime
import com.intellij.openapi.util.JDOMExternalizerUtil
import com.jetbrains.rd.platform.util.application
import com.intellij.util.application
import com.jetbrains.rider.model.PublishableProjectModel
import com.jetbrains.rider.model.publishableProjectsModel
import com.jetbrains.rider.projectView.solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import com.intellij.ide.browsers.WebBrowserReferenceConverter
import com.intellij.openapi.project.Project
import com.intellij.openapi.rd.createLifetime
import com.intellij.openapi.util.JDOMExternalizerUtil
import com.intellij.util.application
import com.intellij.util.xmlb.annotations.Attribute
import com.jetbrains.rd.platform.util.application
import com.jetbrains.rider.model.PublishableProjectModel
import com.jetbrains.rider.model.publishableProjectsModel
import com.jetbrains.rider.projectView.solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.ValidationInfo
import com.intellij.util.application
import com.intellij.util.ui.update.Activatable
import com.intellij.util.ui.update.UiNotifyConnector
import com.jetbrains.rd.platform.util.application
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
import com.jetbrains.rd.util.threading.SpinWait
import com.microsoft.azure.management.appservice.AppServicePlan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.ValidationInfo
import com.jetbrains.rd.platform.util.application
import com.intellij.util.application
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
import com.jetbrains.rd.util.reactive.Signal
import com.jetbrains.rd.util.threading.SpinWait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.Project
import com.intellij.util.application
import com.intellij.util.ui.update.Activatable
import com.intellij.util.ui.update.UiNotifyConnector
import com.jetbrains.rd.platform.util.application
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
import com.jetbrains.rd.util.threading.SpinWait
import com.microsoft.azure.management.appservice.AppServicePlan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.ValidationInfo
import com.intellij.util.application
import com.intellij.util.ui.update.Activatable
import com.intellij.util.ui.update.UiNotifyConnector
import com.jetbrains.rd.platform.util.application
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
import com.jetbrains.rd.util.threading.SpinWait
import com.microsoft.azure.management.resources.ResourceGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.ValidationInfo
import com.intellij.util.application
import com.intellij.util.ui.update.Activatable
import com.intellij.util.ui.update.UiNotifyConnector
import com.jetbrains.rd.platform.util.application
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
import com.jetbrains.rd.util.threading.SpinWait
import com.microsoft.azure.management.resources.Location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.project.Project
import icons.RestClientIcons
import com.intellij.httpClient.RestClientIcons
import org.jetbrains.plugins.azure.RiderAzureBundle.message
import java.io.IOException

Expand Down
Loading

0 comments on commit 048938f

Please sign in to comment.