From 3f51a44dc8dbbe9f8500027cf65d58843cbd8d21 Mon Sep 17 00:00:00 2001 From: Miller Wang Date: Thu, 20 Jun 2024 11:31:51 +0800 Subject: [PATCH 01/32] for 2024.2.eap --- .../azure-intellij-plugin-base/gradle.properties | 8 ++++---- .../cognitiveservices/chatbox/BotMessagePane.java | 4 ++-- .../cognitiveservices/chatbox/UserMessagePane.java | 6 ++---- .../ide/guidance/view/components/CoursePanel.java | 13 ++++++------- .../toolkit/intellij/common/feedback/RatePopup.java | 4 ++-- .../azure-toolkit-for-intellij/gradle.properties | 12 ++++++------ 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-base/gradle.properties b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-base/gradle.properties index 176259d7938..1ad6657dee4 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-base/gradle.properties +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-base/gradle.properties @@ -1,8 +1,8 @@ pluginVersion=3.90.0-SNAPSHOT -intellijDisplayVersion=2024.1 -intellij_version=IU-241-EAP-SNAPSHOT -scala_plugin=org.intellij.scala:2024.1.2 -patchPluginXmlSinceBuild=241.12662.62 +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 diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/BotMessagePane.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/BotMessagePane.java index 65f25df284e..eeafc198476 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/BotMessagePane.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/BotMessagePane.java @@ -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; @@ -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)); } } diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/UserMessagePane.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/UserMessagePane.java index 980d03bf64c..0e5ab99c79b 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/UserMessagePane.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cognitiveservices/src/main/java/com/microsoft/azure/toolkit/intellij/cognitiveservices/chatbox/UserMessagePane.java @@ -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; @@ -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)); } } diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-guidance-java/src/main/java/com/microsoft/azure/toolkit/ide/guidance/view/components/CoursePanel.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-guidance-java/src/main/java/com/microsoft/azure/toolkit/ide/guidance/view/components/CoursePanel.java index 70cebe2e07a..6f8e57c9a78 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-guidance-java/src/main/java/com/microsoft/azure/toolkit/ide/guidance/view/components/CoursePanel.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-guidance-java/src/main/java/com/microsoft/azure/toolkit/ide/guidance/view/components/CoursePanel.java @@ -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; @@ -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; @@ -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(); @@ -66,9 +65,9 @@ private void init() { } this.startButton.setVisible(false); final Action startAction = new Action(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()); @@ -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)); diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/feedback/RatePopup.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/feedback/RatePopup.java index 321d63b75f5..9fd511f302f 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/feedback/RatePopup.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/feedback/RatePopup.java @@ -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; @@ -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; @@ -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()); diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties index a61078e6a7f..4aed6a70c6b 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties @@ -1,12 +1,12 @@ pluginVersion=3.90.0-SNAPSHOT -intellijDisplayVersion=2024.1 -intellij_version=IU-241-EAP-SNAPSHOT -platformVersion=241-EAP-SNAPSHOT +intellijDisplayVersion=2024.2 +intellij_version=IU-242-EAP-SNAPSHOT +platformVersion=242-EAP-SNAPSHOT # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -pluginSinceBuild=241.12662.62 -pluginUntilBuild=241.* +pluginSinceBuild=242.15523.18 +pluginUntilBuild=242.* # Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP -platformPlugins=org.intellij.scala:2024.1.2 +platformPlugins=org.intellij.scala:2024.2.5 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType=IU needPatchVersion=true From a16de2b4878c04b144cfe93bf7f6fad4b1b29fde Mon Sep 17 00:00:00 2001 From: Flanker32 Date: Fri, 21 Jun 2024 17:02:40 +0800 Subject: [PATCH 02/32] Fix compatibility issue with intellij eap --- .../connector/projectexplorer/AbstractAzureFacetNode.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-resource-connector-lib/src/main/java/com/microsoft/azure/toolkit/intellij/connector/projectexplorer/AbstractAzureFacetNode.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-resource-connector-lib/src/main/java/com/microsoft/azure/toolkit/intellij/connector/projectexplorer/AbstractAzureFacetNode.java index 06b883b4870..09b2a58af88 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-resource-connector-lib/src/main/java/com/microsoft/azure/toolkit/intellij/connector/projectexplorer/AbstractAzureFacetNode.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-resource-connector-lib/src/main/java/com/microsoft/azure/toolkit/intellij/connector/projectexplorer/AbstractAzureFacetNode.java @@ -53,6 +53,8 @@ @ToString(onlyExplicitlyIncluded = true) @EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = false) public abstract class AbstractAzureFacetNode extends AbstractTreeNode implements IAzureFacetNode { + public static final Integer DEFAULT_WEIGHT = 30; + private final long createdTime; private long disposedTime; @Getter From 5ea981cb60e8a0d4eec353efa3f60450c0f944ad Mon Sep 17 00:00:00 2001 From: Miller Wang Date: Tue, 25 Jun 2024 14:49:52 +0800 Subject: [PATCH 03/32] [Create Function Project]remove call of deprecated API, AB#2189375 --- .../module/helper/GradleFunctionsModuleBuilderHelper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice-java/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/wizard/module/helper/GradleFunctionsModuleBuilderHelper.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice-java/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/wizard/module/helper/GradleFunctionsModuleBuilderHelper.java index c3b31b4e943..00da2ce277a 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice-java/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/wizard/module/helper/GradleFunctionsModuleBuilderHelper.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice-java/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/wizard/module/helper/GradleFunctionsModuleBuilderHelper.java @@ -6,7 +6,6 @@ package com.microsoft.azure.toolkit.intellij.legacy.function.wizard.module.helper; import com.intellij.ide.util.projectWizard.WizardContext; -import com.intellij.openapi.externalSystem.autolink.ExternalSystemUnlinkedProjectAware; import com.intellij.openapi.externalSystem.importing.ImportSpecBuilder; import com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManagerImpl; import com.intellij.openapi.externalSystem.util.ExternalSystemUtil; @@ -21,6 +20,7 @@ import com.microsoft.azure.toolkit.intellij.legacy.function.wizard.AzureFunctionsConstants; import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager; import org.jetbrains.annotations.NotNull; +import org.jetbrains.plugins.gradle.service.project.open.GradleProjectImportUtil; import org.jetbrains.plugins.gradle.service.project.wizard.AbstractGradleModuleBuilder; import org.jetbrains.plugins.gradle.util.GradleConstants; @@ -55,8 +55,9 @@ public static void setupGradleModule(final WizardContext wizardContext, @NotNull } private static void linkGradleProject(@NotNull Project project) { - ExternalProjectsManagerImpl.getInstance(project).runWhenInitialized(() -> - ExternalSystemUnlinkedProjectAware.getInstance(GradleConstants.SYSTEM_ID).linkAndLoadProject(project, project.getBasePath())); + ExternalProjectsManagerImpl.getInstance(project).runWhenInitialized(() -> { + GradleProjectImportUtil.linkAndRefreshGradleProject(project.getBasePath(), project); + }); } private static void reloadGradleProject(@NotNull Project project, @NotNull Path rootProjectPath) { From d86b57b25d74ef2ca3c7dfeae16df586ac067fa0 Mon Sep 17 00:00:00 2001 From: Miller Wang Date: Tue, 25 Jun 2024 14:56:26 +0800 Subject: [PATCH 04/32] [SSH WebApp] fix to API changes and simplify code, AB#2189364 --- .../action/SSHIntoWebAppAction.java | 94 ++++++++++-------- .../appservice/action/SSHTerminalManager.java | 95 ------------------- .../intellij/common/TerminalUtils.java | 2 +- 3 files changed, 56 insertions(+), 135 deletions(-) delete mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHTerminalManager.java diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHIntoWebAppAction.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHIntoWebAppAction.java index d6461459b43..1edae9d3467 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHIntoWebAppAction.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHIntoWebAppAction.java @@ -6,18 +6,19 @@ package com.microsoft.azure.toolkit.intellij.legacy.appservice.action; import com.intellij.openapi.project.Project; +import com.intellij.terminal.ui.TerminalWidget; +import com.microsoft.azure.toolkit.intellij.common.TerminalUtils; import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem; 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.bundle.AzureString; import com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException; import com.microsoft.azure.toolkit.lib.common.messager.AzureMessager; +import com.microsoft.azure.toolkit.lib.common.operation.AzureOperation; import com.microsoft.azure.toolkit.lib.common.task.AzureTask; import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager; import com.microsoft.azure.toolkit.lib.legacy.appservice.TunnelProxy; import lombok.extern.slf4j.Slf4j; -import org.jetbrains.plugins.terminal.ShellTerminalWidget; -import org.jetbrains.plugins.terminal.TerminalView; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -31,14 +32,21 @@ */ @Slf4j public class SSHIntoWebAppAction { + private static final String SSH_INTO_WEB_APP_ERROR_DIALOG_TITLE = message("webapp.ssh.error.title"); + public static final String SSH_INTO_WEB_APP_ERROR_MESSAGE = message("webapp.ssh.error.message"); + private static final String SSH_INTO_WEB_APP_ERROR_MESSAGE_NOT_SUPPORT_WINDOWS = message("webapp.ssh.error.notSupport.Windows"); + private static final String SSH_INTO_WEB_APP_ERROR_MESSAGE_NOT_SUPPORT_DOCKER = message("webapp.ssh.error.notSupport.Docker"); + private static final String OS_LINUX = "linux"; + 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\" %s@127.0.0.1 -p %d"; + 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 = "[^/]+"; private final Project project; private final String webAppName; - private final String subscriptionId; - private final String resourceGroupName; private final WebApp webApp; public SSHIntoWebAppAction(@Nonnull final WebApp webApp, @Nullable final Project project) { @@ -46,8 +54,6 @@ public SSHIntoWebAppAction(@Nonnull final WebApp webApp, @Nullable final Project this.project = project; this.webApp = webApp; this.webAppName = webApp.getName(); - this.subscriptionId = webApp.getSubscriptionId(); - this.resourceGroupName = webApp.getResourceGroupName(); } public void execute() { @@ -55,43 +61,53 @@ public void execute() { log.info(message("webapp.ssh.hint.startSSH", webAppName)); // ssh to connect to remote web app container. final AzureString title = description("user/webapp.connect_ssh.app", webAppName); - AzureTaskManager.getInstance().runInBackground(new AzureTask(project, title, false, - () -> { - if (webApp.getRuntime().getOperatingSystem() == OperatingSystem.WINDOWS) { - AzureMessager.getMessager().warning(message("webapp.ssh.windowsNotSupport")); - return; - } - final TunnelProxy proxy = new TunnelProxy(webApp); + AzureTaskManager.getInstance().runInBackground(new AzureTask<>(project, title, false, + () -> { + if (webApp.getRuntime().getOperatingSystem() == OperatingSystem.WINDOWS) { + AzureMessager.getMessager().warning(message("webapp.ssh.windowsNotSupport")); + return; + } + final TunnelProxy proxy = new TunnelProxy(webApp); - int localPort; - try { - localPort = proxy.start(); - } catch (IOException e) { + final int localPort; try { - proxy.close(); - } catch (Throwable ex) { - // ignore + localPort = proxy.start(); + } catch (final IOException e) { + try { + proxy.close(); + } catch (final Throwable ex) { + // ignore + } + throw new AzureToolkitRuntimeException(message("webapp.ssh.error.message"), retry); } - throw new AzureToolkitRuntimeException(message("webapp.ssh.error.message"), retry); - } - final int finalLocalPort = localPort; + final int finalLocalPort = localPort; - // ssh to local proxy and open terminal. - AzureTaskManager.getInstance().runAndWait(() -> { - // create a new terminal tab. - TerminalView terminalView = TerminalView.getInstance(project); - ShellTerminalWidget shellTerminalWidget = terminalView.createLocalShellWidget(null, String.format(WEBAPP_TERMINAL_TABLE_NAME, webAppName)); - final AzureString messageTitle = description("boundary/webapp.open_ssh.app", webAppName); - AzureTaskManager.getInstance().runInBackground(new AzureTask(project, messageTitle, false, () -> { - // create connection to the local proxy. - final SSHTerminalManager.CreateRemoteConnectionInfo info = new SSHTerminalManager.CreateRemoteConnectionInfo(); - info.setUsername(TunnelProxy.DEFAULT_SSH_USERNAME); - info.setPassword(TunnelProxy.DEFAULT_SSH_PASSWORD); - info.setPort(finalLocalPort); - SSHTerminalManager.INSTANCE.openConnectionInTerminal(shellTerminalWidget, info); - })); - }, AzureTask.Modality.ANY); - })); + // ssh to local proxy and open terminal. + AzureTaskManager.getInstance().runAndWait(() -> { + // create a new terminal tab. + final TerminalWidget terminalWidget = TerminalUtils.createTerminalWidget(project, null, String.format(WEBAPP_TERMINAL_TABLE_NAME, webAppName)); + final AzureString messageTitle = description("boundary/webapp.open_ssh.app", webAppName); + AzureTaskManager.getInstance().runInBackground(new AzureTask<>(project, messageTitle, false, () -> { + // create connection to the local proxy. + openConnectionInTerminal(terminalWidget, finalLocalPort); + })); + }, AzureTask.Modality.ANY); + })); log.info(message("webapp.ssh.hint.SSHDone", webAppName)); } + + @AzureOperation(name = "boundary/$appservice.open_ssh_terminal") + private void openConnectionInTerminal(TerminalWidget terminalWidget, int port) { + terminalWidget.getTtyConnectorAccessor().executeWithTtyConnector((connector) -> { + terminalWidget.sendCommandToExecute(String.format(CMD_SSH_TO_LOCAL_PROXY, TunnelProxy.DEFAULT_SSH_USERNAME, port)); + AzureTaskManager.getInstance().runOnPooledThread(() -> { + try { + Thread.sleep(3000); + terminalWidget.sendCommandToExecute(TunnelProxy.DEFAULT_SSH_PASSWORD); + } catch (final InterruptedException e) { + log.error("Error occurred when sending password to terminal", e); + } + }); + }); + } } diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHTerminalManager.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHTerminalManager.java deleted file mode 100644 index 04f4742c37e..00000000000 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHTerminalManager.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - */ - -package com.microsoft.azure.toolkit.intellij.legacy.appservice.action; - -import com.jediterm.terminal.TerminalDataStream; -import com.jediterm.terminal.emulator.Emulator; -import com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException; -import com.microsoft.azure.toolkit.lib.common.messager.AzureMessager; -import com.microsoft.azure.toolkit.lib.common.operation.AzureOperation; -import lombok.Data; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.reflect.FieldUtils; -import org.jetbrains.plugins.terminal.ShellTerminalWidget; - -import java.io.IOException; - -import static com.microsoft.azure.toolkit.intellij.common.AzureBundle.message; - -@Slf4j -public enum SSHTerminalManager { - INSTANCE; - - private static final String SSH_INTO_WEB_APP_ERROR_DIALOG_TITLE = message("webapp.ssh.error.title"); - public static final String SSH_INTO_WEB_APP_ERROR_MESSAGE = message("webapp.ssh.error.message"); - private static final String SSH_INTO_WEB_APP_ERROR_MESSAGE_NOT_SUPPORT_WINDOWS = message("webapp.ssh.error.notSupport.Windows"); - private static final String SSH_INTO_WEB_APP_ERROR_MESSAGE_NOT_SUPPORT_DOCKER = message("webapp.ssh.error.notSupport.Docker"); - private static final String OS_LINUX = "linux"; - 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\" %s@127.0.0.1 -p %d"; - - /** - * ssh to connect to local proxy and open the terminal for remote container. - * - * @param shellTerminalWidget - * @param connectionInfo - */ - public void openConnectionInTerminal(ShellTerminalWidget shellTerminalWidget, CreateRemoteConnectionInfo connectionInfo) { - if (connectionInfo == null || connectionInfo.getPort() <= 0 || - StringUtils.isAnyBlank(connectionInfo.getUsername(), connectionInfo.getPassword())) { - AzureMessager.getMessager().error(SSH_INTO_WEB_APP_ERROR_MESSAGE, SSH_INTO_WEB_APP_ERROR_DIALOG_TITLE); - return; - } - try { - int count = 0; - while ((shellTerminalWidget.getTtyConnector() == null) && count++ < 200) { - Thread.sleep(100); - } - - while ((shellTerminalWidget.getTerminalStarter() == null) && count++ < 200) { - Thread.sleep(100); - } - doOpenTerminal(shellTerminalWidget, connectionInfo); - } catch (IOException | InterruptedException | IllegalAccessException e) { - throw new AzureToolkitRuntimeException(e); - } - } - - @AzureOperation(name = "boundary/$appservice.open_ssh_terminal") - private void doOpenTerminal(ShellTerminalWidget shellTerminalWidget, CreateRemoteConnectionInfo connectionInfo) throws IOException, IllegalAccessException { - shellTerminalWidget.executeCommand(String.format(CMD_SSH_TO_LOCAL_PROXY, connectionInfo.getUsername(), connectionInfo.getPort())); - waitForInputPassword(shellTerminalWidget, 30000); - shellTerminalWidget.executeCommand(connectionInfo.getPassword()); - } - - private void waitForInputPassword(ShellTerminalWidget shellTerminalWidget, int timeout) throws IllegalAccessException { - final Emulator emulator = (Emulator) FieldUtils.readField(shellTerminalWidget.getTerminalStarter(), "myEmulator", true); - final TerminalDataStream terminalDataStream = (TerminalDataStream) FieldUtils.readField(emulator, "myDataStream", true); - char[] myBuf = (char[]) FieldUtils.readField(terminalDataStream, "myBuf", true); - int count = 0; - int interval = 100; - int countMax = timeout / interval; - try { - while (count++ < countMax) { - if (myBuf != null && String.valueOf(myBuf).contains("password:")) { - return; - } - Thread.sleep(interval); - } - } catch (InterruptedException e) { - } - log.info(message("webapp.ssh.hint.passwordNotReady")); - } - - @Data - public static class CreateRemoteConnectionInfo { - private String username; - private String password; - private int port; - } -} diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/TerminalUtils.java b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/TerminalUtils.java index 7cf8f131e16..7fec3554b57 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/TerminalUtils.java +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/TerminalUtils.java @@ -50,7 +50,7 @@ public static void executeInTerminal(@Nonnull Project project, @Nonnull String c } @Nonnull - private static TerminalWidget createTerminalWidget(@Nonnull Project project, @Nullable Path workingDir, String terminalTabTitle) { + public static TerminalWidget createTerminalWidget(@Nonnull Project project, @Nullable Path workingDir, String terminalTabTitle) { final TerminalToolWindowManager manager = TerminalToolWindowManager.getInstance(project); final String workingDirectory = Optional.ofNullable(workingDir).map(Path::toString).orElse(null); return manager.createShellWidget(workingDirectory, terminalTabTitle, true, true); From 83eb1947bd5963e49d4a051268df1e709777658a Mon Sep 17 00:00:00 2001 From: Miller Wang Date: Tue, 25 Jun 2024 15:02:39 +0800 Subject: [PATCH 05/32] refactor gradle configuration and fix with eap version of platform dependency with `org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false` --- PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties index d9b3a8badd0..5fc23b33daa 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties @@ -33,6 +33,8 @@ org.gradle.console=rich org.gradle.configureondemand=true org.gradle.daemon=true org.gradle.jvmargs='-Duser.language=en' +# see https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1638 +org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false From c60effeadd063e424b8beb265540a790f3f4c050 Mon Sep 17 00:00:00 2001 From: Miller Wang Date: Wed, 26 Jun 2024 11:47:14 +0800 Subject: [PATCH 06/32] Revert "refactor gradle configuration and fix with eap version of platform dependency with" This reverts commit 83eb1947bd5963e49d4a051268df1e709777658a. --- PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties | 2 -- 1 file changed, 2 deletions(-) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties index 5fc23b33daa..d9b3a8badd0 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties @@ -33,8 +33,6 @@ org.gradle.console=rich org.gradle.configureondemand=true org.gradle.daemon=true org.gradle.jvmargs='-Duser.language=en' -# see https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1638 -org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false From 0f86c50d5d67253e37ae8444b7e9ea8df21d3445 Mon Sep 17 00:00:00 2001 From: Miller Wang Date: Fri, 28 Jun 2024 10:24:59 +0800 Subject: [PATCH 07/32] fix reported issue template. --- .../com/microsoft/intellij/feedback/HDInsightReportable.kt | 2 +- .../microsfot/azure/toolkit/intellij/feedback/GithubIssue.kt | 2 +- .../com/microsfot/azure/toolkit/intellij/feedback/Reportable.kt | 2 +- .../azure/toolkit/intellij/feedback/ReportableFeatureRequest.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-hdinsight-lib/src/main/kotlin/com/microsoft/intellij/feedback/HDInsightReportable.kt b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-hdinsight-lib/src/main/kotlin/com/microsoft/intellij/feedback/HDInsightReportable.kt index db88c748f23..49b69c8e0ba 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-hdinsight-lib/src/main/kotlin/com/microsoft/intellij/feedback/HDInsightReportable.kt +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-hdinsight-lib/src/main/kotlin/com/microsoft/intellij/feedback/HDInsightReportable.kt @@ -45,7 +45,7 @@ open class HDInsightReportable(private val shortMessage: String) : DumbAware { private val additionalInfo = mutableMapOf() open fun getTitleTags(): Set { - return setOf("IntelliJ", "ReportedByUser") + return setOf("IntelliJ") } open fun getTitle(): String { diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/GithubIssue.kt b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/GithubIssue.kt index b05f9918602..cc72486a493 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/GithubIssue.kt +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/GithubIssue.kt @@ -32,7 +32,7 @@ import java.nio.charset.StandardCharsets class GithubIssue(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() { diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/Reportable.kt b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/Reportable.kt index 7307c79e095..1ad5c10278b 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/Reportable.kt +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/Reportable.kt @@ -45,7 +45,7 @@ open class Reportable(private val shortMessage: String) : DumbAware { private val additionalInfo = mutableMapOf() open fun getTitleTags(): Set { - return setOf("IntelliJ", "ReportedByUser") + return setOf("IntelliJ") } open fun getTitle(): String { diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/ReportableFeatureRequest.kt b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/ReportableFeatureRequest.kt index 265764a1886..5f0e432edef 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/ReportableFeatureRequest.kt +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/kotlin/com/microsfot/azure/toolkit/intellij/feedback/ReportableFeatureRequest.kt @@ -32,7 +32,7 @@ class ReportableFeatureRequest(shortMessage: String) : Reportable(shortMessage) ) override fun getTitleTags(): Set { - return setOf("IntelliJ", "ReportedByUser", "feature-request") + return setOf("IntelliJ", "feature-request") } override fun getBody(): String { From da7344710a9b1b5d42922990321d435d000f1c1b Mon Sep 17 00:00:00 2001 From: Miller Wang Date: Fri, 28 Jun 2024 10:35:24 +0800 Subject: [PATCH 08/32] configure `org.jetbrains.intellij.platform.buildFeature.useBinaryReleases` to support SNAPSHOT version `xxx-EAP-SNAPSHOT` --- PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties index b5f6b35e347..7877bd1c851 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/gradle.properties @@ -1,7 +1,7 @@ pluginVersion=3.90.0 intellijDisplayVersion=2024.2 intellij_version=IU-242-EAP-SNAPSHOT -platformVersion=242.18071.24 +platformVersion=242-EAP-SNAPSHOT # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=242 pluginUntilBuild=242.* From 91269d14bce1cc6f1e36ae7c84c9819be28f66d3 Mon Sep 17 00:00:00 2001 From: Rival Abdrakhmanov Date: Fri, 19 Jul 2024 11:02:29 +0200 Subject: [PATCH 09/32] Add an azure-intellij-plugin-cloud-shell module --- .../.idea/gradle.xml | 1 + .../build.gradle.kts | 46 ++++ .../CloudShellAccessTokenService.kt | 47 ++++ .../CloudShellProvisioningService.kt | 218 ++++++++++++++++++ .../intellij/cloudshell/CloudShellService.kt | 33 +++ .../actions/CloseAllCloudShellPortsAction.kt | 34 +++ .../actions/CloseCloudShellPortAction.kt | 34 +++ .../actions/CloseCloudShellPortActionGroup.kt | 41 ++++ .../actions/OpenCloudShellPortAction.kt | 51 ++++ .../cloudshell/actions/RevealFileAction.kt | 24 ++ .../actions/StartCloudShellAction.kt | 70 ++++++ .../actions/UploadToCloudShellAction.kt | 53 +++++ .../CloudConsoleControlChannelClient.kt | 75 ++++++ .../controlchannel/ControlMessage.kt | 14 ++ .../DownloadControlMessageHandler.kt | 77 +++++++ .../UrlControlMessageHandler.kt | 62 +++++ .../rest/CloudConsoleProvisionParameters.kt | 17 ++ .../rest/CloudConsoleProvisionResult.kt | 18 ++ ...CloudConsoleProvisionTerminalParameters.kt | 12 + .../CloudConsoleProvisionTerminalResult.kt | 12 + .../cloudshell/rest/CloudConsoleService.kt | 205 ++++++++++++++++ .../rest/CloudConsoleUserSettings.kt | 33 +++ .../cloudshell/rest/PreviewPortResult.kt | 13 ++ .../terminal/AzureCloudProcessTtyConnector.kt | 181 +++++++++++++++ .../terminal/AzureCloudTerminalFactory.kt | 39 ++++ .../terminal/AzureCloudTerminalProcess.kt | 15 ++ .../terminal/AzureCloudTerminalRunner.kt | 78 +++++++ .../terminal/CloudConsoleTerminalWebSocket.kt | 80 +++++++ .../utils/PreviewPortInputValidator.kt | 23 ++ .../azure-intellij-plugin-cloud-shell.xml | 49 ++++ .../build.gradle.kts | 1 + .../gradle/libs.versions.toml | 2 + .../settings.gradle.kts | 3 +- .../src/main/resources/META-INF/plugin.xml | 3 + .../icons/CloudShell/OpenCloudShell.svg | 6 + .../icons/CloudShell/OpenCloudShell_dark.svg | 6 + 36 files changed, 1675 insertions(+), 1 deletion(-) create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/build.gradle.kts create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/CloudShellAccessTokenService.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/CloudShellProvisioningService.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/CloudShellService.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/actions/CloseAllCloudShellPortsAction.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/actions/CloseCloudShellPortAction.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/actions/CloseCloudShellPortActionGroup.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/actions/OpenCloudShellPortAction.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/actions/RevealFileAction.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/actions/StartCloudShellAction.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/actions/UploadToCloudShellAction.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/controlchannel/CloudConsoleControlChannelClient.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/controlchannel/ControlMessage.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/controlchannel/DownloadControlMessageHandler.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/controlchannel/UrlControlMessageHandler.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/rest/CloudConsoleProvisionParameters.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/rest/CloudConsoleProvisionResult.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/rest/CloudConsoleProvisionTerminalParameters.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/rest/CloudConsoleProvisionTerminalResult.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/rest/CloudConsoleService.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/rest/CloudConsoleUserSettings.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/rest/PreviewPortResult.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/terminal/AzureCloudProcessTtyConnector.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/terminal/AzureCloudTerminalFactory.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/terminal/AzureCloudTerminalProcess.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/terminal/AzureCloudTerminalRunner.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/terminal/CloudConsoleTerminalWebSocket.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/kotlin/com/microsoft/azure/toolkit/intellij/cloudshell/utils/PreviewPortInputValidator.kt create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cloud-shell/src/main/resources/META-INF/azure-intellij-plugin-cloud-shell.xml create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/src/main/resources/icons/CloudShell/OpenCloudShell.svg create mode 100644 PluginsAndFeatures/azure-toolkit-for-intellij/src/main/resources/icons/CloudShell/OpenCloudShell_dark.svg diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/.idea/gradle.xml b/PluginsAndFeatures/azure-toolkit-for-intellij/.idea/gradle.xml index 3ffccecde10..6cb7b0faf15 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/.idea/gradle.xml +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/.idea/gradle.xml @@ -15,6 +15,7 @@