Skip to content

Commit

Permalink
Merge pull request #995 from JetBrains/endgame-202410
Browse files Browse the repository at this point in the history
Merge Endgame 202410
  • Loading branch information
rafaelldi authored Jan 7, 2025
2 parents 81dc9d4 + 013c6b1 commit 8de2716
Show file tree
Hide file tree
Showing 91 changed files with 362 additions and 250 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:

env:
# Branches from the https://github.com/microsoft/azure-maven-plugins and https://github.com/microsoft/azure-tools-for-java repositories
ENDGAME_VERSION: endgame-202408
ENDGAME_VERSION: endgame-202410

jobs:

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in this file.

- [Change Log](#change-log)
- [3.93.0](#3930)
- [3.92.0](#3920)
- [3.91.0](#3910)
- [3.90.0](#3900)
Expand Down Expand Up @@ -114,6 +115,10 @@ All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in t
- [3.0.7](#307)
- [3.0.6](#306)

## 3.93.0
- Support IntelliJ 2024.3 Beta
- Support Azure Cloud Shell (Thanks for @rafaelldi)

## 3.92.0
- Added Managed identity support for Azure Functions.
- Fixed [#8473](https://github.com/microsoft/azure-tools-for-java/issues/8473): Class initialization must not depend on services. Consider using instance of the service on-demand instead.
Expand Down
6 changes: 3 additions & 3 deletions PluginsAndFeatures/AddLibrary/AzureLibraries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>com.microsoft.azuretools</groupId>
<artifactId>utils</artifactId>
<version>3.92.0</version>
<version>3.93.0</version>
</parent>
<groupId>com.microsoft.azuretools</groupId>
<artifactId>com.microsoft.azuretools.sdk.lib</artifactId>
Expand All @@ -39,9 +39,9 @@
</organization>

<properties>
<azuretool.version>3.92.0</azuretool.version>
<azuretool.version>3.93.0</azuretool.version>
<azuretool.sdk.version>3.32.0.qualifier</azuretool.sdk.version>
<azure.toolkit-lib.version>0.48.0</azure.toolkit-lib.version>
<azure.toolkit-lib.version>0.49.0</azure.toolkit-lib.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ Export-Package: com.microsoft.azuretools.appservice,
com.microsoft.azuretools.appservice.handlers,
com.microsoft.azuretools.appservice.ui
Bundle-ClassPath: .,
target/lib/azure-toolkit-ide-appservice-lib-0.48.0.jar
target/lib/azure-toolkit-ide-appservice-lib-0.49.0.jar
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-toolkit-ide-appservice-lib</artifactId>
<version>0.48.0</version>
<version>0.49.0</version>
</dependency>
</dependencies>
<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Require-Bundle: org.eclipse.ui,
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
target/lib/azure-toolkit-ide-springcloud-lib-0.48.0.jar
target/lib/azure-toolkit-ide-springcloud-lib-0.49.0.jar
Import-Package: com.microsoft.azuretools.core.actions,
org.eclipse.core.expressions,
org.eclipse.jface.text.hyperlink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-toolkit-ide-springcloud-lib</artifactId>
<version>0.48.0</version>
<version>0.49.0</version>
</dependency>
</dependencies>
<build>
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ public void execute() throws Exception {
webAppConfig.subscriptionId(subscription.getId());
webAppConfig.runtime(RuntimeConfig.fromRuntime(WebAppRuntime.getDefaultJavaseRuntime()));

final String rgName = Utils.generateRandomResourceName(String.format("rg-%s", name), 90);
webAppConfig.resourceGroup(rgName);
final WebAppBase<?, ?, ?> webApp = WebAppService.getInstance().createWebApp(webAppConfig);
context.applyResult(WEBAPP_ID, webApp.getId());
context.applyResult(RESOURCE_GROUP, webApp.getResourceGroupName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.microsoft.azure.toolkit.ide.common.action.ResourceCommonActionsContributor;
import com.microsoft.azure.toolkit.intellij.common.TerminalUtils;
import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem;
import com.microsoft.azure.toolkit.lib.appservice.model.Runtime;
import com.microsoft.azure.toolkit.lib.appservice.webapp.WebApp;
import com.microsoft.azure.toolkit.lib.common.action.Action;
import com.microsoft.azure.toolkit.lib.common.action.AzureActionManager;
Expand All @@ -30,6 +31,7 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.AbstractList;
import java.util.Optional;

import static com.microsoft.azure.toolkit.intellij.common.AzureBundle.message;
import static com.microsoft.azure.toolkit.lib.common.operation.OperationBundle.description;
Expand All @@ -47,7 +49,7 @@ public class SSHIntoWebAppAction {
private static final String WEB_APP_DOCKER_PREFIX = "DOCKER|";
private static final String CMD_SSH_TO_LOCAL_PROXY =
"ssh -o StrictHostKeyChecking=no -o \"UserKnownHostsFile /dev/null\" -o \"LogLevel ERROR\" %[email protected] -p %d";

private static final Integer TERMINAL_MAX_SIZE = 1024 * 8;
private static final String WEBAPP_TERMINAL_TABLE_NAME = "SSH - %s";
private static final String RESOURCE_GROUP_PATH_PREFIX = "resourceGroups/";
private static final String RESOURCE_ELEMENT_PATTERN = "[^/]+";
Expand All @@ -70,7 +72,7 @@ public void execute() {
final AzureString title = description("user/webapp.connect_ssh.app", webAppName);
AzureTaskManager.getInstance().runInBackground(new AzureTask<>(project, title, false,
() -> {
if (webApp.getRuntime().getOperatingSystem() == OperatingSystem.WINDOWS) {
if (Optional.ofNullable(webApp.getRuntime()).map(Runtime::getOperatingSystem).orElse(null) == OperatingSystem.WINDOWS) {
AzureMessager.getMessager().warning(message("webapp.ssh.windowsNotSupport"));
return;
}
Expand Down Expand Up @@ -131,12 +133,14 @@ private static boolean waitForInputPassword(TtyConnector connector) throws Illeg
final int interval = 500;
final int times = 30000 / interval;
while (count++ < times) {
final AbstractList<Byte> outputCache = (AbstractList<Byte>) FieldUtils.readField(connector, "outputCache", true);
Byte[] bytes = new Byte[outputCache.size()];
bytes = outputCache.toArray(bytes);
final byte[] myBuf = ArrayUtils.toPrimitive(bytes);
if (myBuf != null && new String(myBuf, StandardCharsets.UTF_8).contains("password:")) {
return true;
try {
final char[] result = new char[TERMINAL_MAX_SIZE];
connector.read(result, 0, TERMINAL_MAX_SIZE -1 );
if (new String(result).contains("password:")) {
return true;
}
} catch (final IOException ignore) {
continue;
}
Thread.sleep(interval);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ allprojects {
}

ext {
azureToolkitLibsVersion = "0.48.0"
azureToolkitIdeLibsVersion = "0.48.0"
azureToolkitLibsVersion = "0.49.0"
azureToolkitIdeLibsVersion = "0.49.0"
}

dependencyManagement {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pluginVersion=3.92.0
intellijDisplayVersion=2024.1
intellij_version=IU-241-EAP-SNAPSHOT
scala_plugin=org.intellij.scala:2024.1.2
patchPluginXmlSinceBuild=241.12662.62
pluginVersion=3.93.0
intellijDisplayVersion=2024.2
intellij_version=IU-242-EAP-SNAPSHOT
scala_plugin=org.intellij.scala:2024.2.5
patchPluginXmlSinceBuild=242.15523.18
needPatchVersion=true
javaVersion=17
sources=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude">
<id>com.microsoft.tooling.msservices.intellij.azure</id>
<name>Azure Toolkit</name>
<version>3.92.0</version>
<version>3.93.0</version>
<vendor email="[email protected]" url="http://www.microsoft.com">Microsoft</vendor>

<description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.intellij.openapi.fileChooser.FileChooserDescriptor
import com.intellij.openapi.progress.currentThreadCoroutineScope
import com.intellij.openapi.vfs.VirtualFile
import com.microsoft.azure.toolkit.intellij.cloudshell.CloudShellService
import com.microsoft.azure.toolkit.lib.common.messager.AzureMessager
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

Expand All @@ -35,7 +36,7 @@ class UploadToCloudShellAction : AnAction() {
val activeConnector = CloudShellService.getInstance(project).activeConnector() ?: return

currentThreadCoroutineScope().launch(Dispatchers.EDT) {
val descriptor = FileChooserDescriptor(true, false, false, true, false, true).apply {
val descriptor = FileChooserDescriptor(true, false, true, true, false, true).apply {
title = "Select File(s) To Upload To Azure Cloud Shell"
}
FileChooser.chooseFiles(descriptor, project, null, null, object : FileChooser.FileChooserConsumer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package com.microsoft.azure.toolkit.intellij.cloudshell.terminal
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Disposer
import com.intellij.platform.util.coroutines.childScope
import com.intellij.platform.util.coroutines.namedChildScope
import com.jediterm.terminal.TtyConnector
import com.microsoft.azure.toolkit.intellij.cloudshell.CloudShellService
import com.microsoft.azure.toolkit.intellij.cloudshell.controlchannel.CloudConsoleControlChannelClient
Expand Down Expand Up @@ -56,7 +56,7 @@ class AzureCloudTerminalRunner(
cloudConsoleBaseUrl,
project
)
controlClient.connect(scope.childScope("CloudConsoleControlChannelClient"))
controlClient.connect(scope.namedChildScope("CloudConsoleControlChannelClient"))

val connector = createConnector(process)
Disposer.register(connector, controlClient)
Expand All @@ -70,7 +70,7 @@ class AzureCloudTerminalRunner(
private fun createConnector(process: CloudTerminalProcess) = AzureCloudProcessTtyConnector(
process,
project,
scope.childScope("AzureCloudProcessTtyConnector"),
scope.namedChildScope("AzureCloudProcessTtyConnector"),
uploadFileToTerminalUrl,
previewPortBaseUrl,
resizeTerminalUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

package com.microsoft.azure.toolkit.intellij.cognitiveservices.chatbox;

import com.intellij.collaboration.ui.codereview.comment.RoundedPanel;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.ui.JBColor;
import com.intellij.ui.components.panels.BackgroundRoundedPanel;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.util.IconUtil;
import com.microsoft.azure.toolkit.ide.common.icon.AzureIcons;
Expand Down Expand Up @@ -50,6 +50,6 @@ private void setValue(MarkdownText markdownText) {
private void createUIComponents() {
// final int arc = NotificationBalloonRoundShadowBorderProvider.CORNER_RADIUS.get();
//noinspection UnstableApiUsage
this.messageContainer = new RoundedPanel(new GridLayoutManager(1, 1), 5);
this.messageContainer = new BackgroundRoundedPanel(5, new GridLayoutManager(1, 1));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@

package com.microsoft.azure.toolkit.intellij.cognitiveservices.chatbox;

import com.intellij.collaboration.ui.codereview.comment.RoundedPanel;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.ui.JBColor;
import com.intellij.ui.NotificationBalloonRoundShadowBorderProvider;
import com.intellij.ui.components.panels.BackgroundRoundedPanel;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.util.IconUtil;
import com.microsoft.azure.toolkit.ide.common.icon.AzureIcons;
Expand Down Expand Up @@ -52,6 +50,6 @@ private void setValue(MarkdownText markdownText) {
private void createUIComponents() {
// final int arc = NotificationBalloonRoundShadowBorderProvider.CORNER_RADIUS.get();
//noinspection UnstableApiUsage
this.messageContainer = new RoundedPanel(new GridLayoutManager(1, 1), 5);
this.messageContainer = new BackgroundRoundedPanel(5, new GridLayoutManager(1, 1));
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.microsoft.azure.toolkit.ide.guidance.view.components;

import com.intellij.collaboration.ui.codereview.comment.RoundedPanel;
import com.intellij.openapi.project.Project;
import com.intellij.ui.JBColor;
import com.intellij.ui.components.panels.BackgroundRoundedPanel;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.util.ui.JBFont;
import com.intellij.util.ui.JBUI;
Expand All @@ -21,7 +21,6 @@
import javax.annotation.Nonnull;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import java.awt.*;
import java.awt.event.MouseListener;
import java.util.Arrays;
Expand All @@ -41,7 +40,7 @@ public class CoursePanel {
private boolean isStartedActionTriggered;
private final boolean showNewUIFlag;
public static final JBColor NOTIFICATION_BACKGROUND_COLOR =
JBColor.namedColor("StatusBar.hoverBackground", new JBColor(15595004, 4606541));
JBColor.namedColor("StatusBar.hoverBackground", new JBColor(15595004, 4606541));

public CoursePanel(@Nonnull final CourseConfig course, @Nonnull final Project project) {
super();
Expand All @@ -66,9 +65,9 @@ private void init() {
}
this.startButton.setVisible(false);
final Action<Void> startAction = new Action<Void>(Action.Id.of("user/guidance.open_course.course"))
.withAuthRequired(false)
.withIdParam(ignore -> this.course.getTitle())
.withHandler(ignore -> openGuidance());
.withAuthRequired(false)
.withIdParam(ignore -> this.course.getTitle())
.withHandler(ignore -> openGuidance());
this.startButton.setAction(startAction);
this.areaDescription.setFont(JBFont.medium());
this.areaDescription.setText(course.getDescription());
Expand Down Expand Up @@ -130,7 +129,7 @@ private void setBackgroundColor(@Nonnull final JPanel c, @Nonnull final Color co

private void createUIComponents() {
//noinspection UnstableApiUsage
this.rootPanel = new RoundedPanel(new GridLayoutManager(3, 3), 5);
this.rootPanel = new BackgroundRoundedPanel(5, new GridLayoutManager(3, 3));
this.rootPanel.setBorder(BorderFactory.createEmptyBorder());
this.tagsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 8, 0));
this.tagsPanel.setBorder(JBUI.Borders.emptyLeft(-8));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ open class HDInsightReportable(private val shortMessage: String) : DumbAware {
private val additionalInfo = mutableMapOf<String, String>()

open fun getTitleTags(): Set<String> {
return setOf("IntelliJ", "ReportedByUser")
return setOf("IntelliJ")
}

open fun getTitle(): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import java.nio.charset.StandardCharsets
class GithubIssue<T : Reportable>(private val reportable: T) {
private val plugin = reportable.plugin
private val loginPrefix = "https://github.com/login"
private val labels = mutableSetOf("IntelliJ")
private val labels = mutableSetOf("IntelliJ Reported")

private val pluginRepo: URI
get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ open class Reportable(private val shortMessage: String) : DumbAware {
private val additionalInfo = mutableMapOf<String, String>()

open fun getTitleTags(): Set<String> {
return setOf("IntelliJ", "ReportedByUser")
return setOf("IntelliJ")
}

open fun getTitle(): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ReportableFeatureRequest(shortMessage: String) : Reportable(shortMessage)
)

override fun getTitleTags(): Set<String> {
return setOf("IntelliJ", "ReportedByUser", "feature-request")
return setOf("IntelliJ", "feature-request")
}

override fun getBody(): String {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<!-- Version: 3.88.0 -->
# What's new in Azure Toolkit for IntelliJ

## 3.93.0
- Support IntelliJ 2024.3 Beta
- Support Azure Cloud Shell (Thanks for @rafaelldi)

## 3.92.0
- Added Managed identity support for Azure Functions.
- Fixed [#8473](https://github.com/microsoft/azure-tools-for-java/issues/8473): Class initialization must not depend on services. Consider using instance of the service on-demand instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package com.microsoft.azure.toolkit.intellij.common.feedback;

import com.intellij.collaboration.ui.codereview.comment.RoundedPanel;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.popup.Balloon;
Expand All @@ -16,6 +15,7 @@
import com.intellij.ui.NotificationBalloonRoundShadowBorderProvider;
import com.intellij.ui.awt.RelativePoint;
import com.intellij.ui.components.ActionLink;
import com.intellij.ui.components.panels.BackgroundRoundedPanel;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.util.IconUtil;
import com.intellij.util.ui.JBUI;
Expand Down Expand Up @@ -74,7 +74,7 @@ public RatePopup() {
private void createUIComponents() {
final int arc = NotificationBalloonRoundShadowBorderProvider.CORNER_RADIUS.get();
//noinspection UnstableApiUsage
this.contentPanel = new RoundedPanel(new GridLayoutManager(4, 1), arc);
this.contentPanel = new BackgroundRoundedPanel(arc, new GridLayoutManager(4, 1));
this.contentPanel.setPreferredSize(new Dimension(338, 112));
this.contentPanel.setBackground(BACKGROUND_COLOR);
this.contentPanel.setBorder(BorderFactory.createEmptyBorder());
Expand Down
Loading

0 comments on commit 8de2716

Please sign in to comment.