You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/TerminalUtils.java
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,19 @@ public static TerminalWidget getOrCreateTerminalWidget(@Nonnull Project project,
Copy file name to clipboardExpand all lines: PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-service-explorer/src/main/java/com/microsoft/azure/toolkit/intellij/explorer/AzureExplorer.java
privatestaticfinalStringMAC_AZD_INSTALL_COMMAND = "brew tap azure/azd && brew install azd";
21
33
22
34
privatefinalProjectproject;
23
35
24
36
publicAzdNode(Projectproject) {
25
37
super("Azure Developer (Preview)");
26
38
this.project = project;
27
39
withIcon(AzureIcons.Common.SERVICES);
28
-
addChildren();
40
+
initializeNode();
29
41
}
30
42
31
-
publicvoidaddChildren() {
43
+
publicvoidinitializeNode() {
32
44
if (isAzdInstalled()) {
33
45
AzdUtils.logTelemetryEvent("azd-installed");
34
-
if (isAzdSignedIn()) {
35
-
AzdUtils.logTelemetryEvent("azd-signed-in");
36
-
withDescription("Signed In");
37
-
addChild(getCreateFromTemplatesNode());
38
-
addChild(getInitializeFromSourceNode());
39
-
addChild(getProvisionResourcesNode());
40
-
addChild(getDeployToAzureNode());
41
-
addChild(getProvisionAndDeployToAzureNode());
46
+
showAzdActions();
47
+
} else {
48
+
showNotInstalled();
49
+
}
50
+
}
51
+
52
+
privatevoidshowNotInstalled() {
53
+
AzdUtils.logTelemetryEvent("azd-not-installed");
54
+
withDescription("Install azd");
55
+
onClicked(e -> {
56
+
finalStringcommand;
57
+
if (SystemUtils.IS_OS_WINDOWS) {
58
+
command = WIN_AZD_INSTALL_COMMAND;
59
+
} elseif (SystemUtils.IS_OS_LINUX) {
60
+
command = LINUX_AZD_INSTALL_COMMAND;
42
61
} else {
43
-
AzdUtils.logTelemetryEvent("azd-not-signed-in");
44
-
withDescription("Not Signed In");
45
-
onClicked(e -> {
46
-
finalConfirmAndRunDialogconfirmAndRunDialog = newConfirmAndRunDialog(project, "Sign in", "Do you want to sign in to Azure Developer CLI (azd)?", "azd auth login");
47
-
confirmAndRunDialog.setOkButtonText("Sign In");
48
-
confirmAndRunDialog.show();
49
-
});
62
+
command = MAC_AZD_INSTALL_COMMAND;
50
63
}
51
-
} else {
52
-
AzdUtils.logTelemetryEvent("azd-not-installed");
53
-
withDescription("Install azd");
54
-
onClicked(e -> {
55
-
finalStringcommand;
56
-
if (System.getProperties().getProperty("os.name").toLowerCase().contains("windows")) {
Copy file name to clipboardExpand all lines: PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-service-explorer/src/main/java/com/microsoft/azure/toolkit/intellij/explorer/azd/AzdTemplatesDialog.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ public AzdTemplatesDialog(@Nullable Project project) {
Copy file name to clipboardExpand all lines: PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-service-explorer/src/main/java/com/microsoft/azure/toolkit/intellij/explorer/azd/AzdTemplatesLibrary.java
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
importcom.intellij.icons.AllIcons;
8
8
importcom.intellij.ide.BrowserUtil;
9
9
importcom.intellij.openapi.project.Project;
10
+
importcom.intellij.openapi.ui.DialogWrapper;
10
11
importcom.intellij.openapi.ui.VerticalFlowLayout;
11
12
importcom.intellij.ui.HyperlinkLabel;
12
13
importcom.intellij.ui.ScrollPaneFactory;
@@ -38,10 +39,12 @@ public class AzdTemplatesLibrary extends JPanel {
ConfirmAndRunDialogcreateDialog = newConfirmAndRunDialog(project, "Create from template", "Create a new project from the selected template?", command);
158
-
createDialog.setOkButtonText("Create");
160
+
finalConfirmAndRunDialogcreateDialog = newConfirmAndRunDialog(project, "Create from template")
161
+
.setLabel("Create a new project from the selected template?")
0 commit comments