Skip to content

Commit acbaa50

Browse files
authored
ARM support in Intellij (#3169)
1 parent fa84bc2 commit acbaa50

File tree

47 files changed

+3060
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3060
-3
lines changed

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.azureexplorer/src/com/microsoft/azuretools/azureexplorer/helpers/UIHelperImpl.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.text.DecimalFormat;
2929
import java.util.Map;
3030

31+
import com.microsoft.tooling.msservices.serviceexplorer.azure.arm.deployments.DeploymentNode;
3132
import org.eclipse.jface.dialogs.MessageDialog;
3233
import org.eclipse.swt.SWT;
3334
import org.eclipse.swt.widgets.Display;
@@ -65,6 +66,7 @@
6566
import com.microsoft.tooling.msservices.model.storage.Queue;
6667
import com.microsoft.tooling.msservices.model.storage.StorageServiceTreeItem;
6768
import com.microsoft.tooling.msservices.model.storage.Table;
69+
import com.microsoft.tooling.msservices.serviceexplorer.Node;
6870
import com.microsoft.tooling.msservices.serviceexplorer.azure.container.ContainerRegistryNode;
6971
import com.microsoft.tooling.msservices.serviceexplorer.azure.rediscache.RedisCacheNode;
7072
import com.microsoft.tooling.msservices.serviceexplorer.azure.webapp.WebAppNode;
@@ -139,6 +141,12 @@ public File showFileChooser(String title) {
139141
}
140142
}
141143

144+
@Override
145+
public File showFileSaver(String s, String s1) {
146+
// todo
147+
return null;
148+
}
149+
142150
@Override
143151
public <T extends StorageServiceTreeItem> void openItem(Object projectObject, final ClientStorageAccount clientStorageAccount, final T item, String itemType, String itemName, String iconName) {
144152
// Display.getDefault().syncExec(new Runnable() {
@@ -292,6 +300,16 @@ public void openRedisExplorer(@NotNull RedisCacheNode node) {
292300
openEditor(EditorType.REDIS_EXPLORER, input, descriptor);
293301
}
294302

303+
@Override
304+
public void openDeploymentPropertyView(DeploymentNode deploymentNode) {
305+
// TODO Auto-generated method stub
306+
}
307+
308+
@Override
309+
public void openResourceTemplateView(DeploymentNode deploymentNode, String s) {
310+
// TODO Auto-generated method stub
311+
}
312+
295313
@Override
296314
public void openContainerRegistryPropertyView(@NotNull ContainerRegistryNode node) {
297315
String sid = node.getSubscriptionId();
@@ -392,4 +410,16 @@ public void openDeploymentSlotPropertyView(final DeploymentSlotNode node) {
392410
IEditorDescriptor descriptor = workbench.getEditorRegistry().findEditor(DeploymentSlotEditor.ID);
393411
openEditor(EditorType.WEBAPP_EXPLORER, input, descriptor);
394412
}
413+
414+
@Override
415+
public void showInfo(Node node, String message) {
416+
// TODO Auto-generated method stub
417+
418+
}
419+
420+
@Override
421+
public void showError(Node node, String s) {
422+
// TODO Auto-generated method stub
423+
}
424+
395425
}

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.azureexplorer/src/com/microsoft/azuretools/azureexplorer/views/ServiceExplorerView.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ public void listChanged(final ListChangedEvent e) {
251251
case add:
252252
// create child tree nodes for the new nodes
253253
for (Node childNode : (Collection<Node>) e.getNewItems()) {
254+
// Eclipse do no support arm, so here need to skip resource management node
255+
if (childNode.getClass().getName().equals(
256+
"com.microsoft.tooling.msservices.serviceexplorer.azure.arm.ResourceManagementModule")) {
257+
continue;
258+
}
254259
treeNode.add(createTreeNode(childNode));
255260
}
256261
break;

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.core/META-INF/MANIFEST.MF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Export-Package: com.microsoft.applicationinsights.preference,
112112
com.microsoft.tooling.msservices.model.vm,
113113
com.microsoft.tooling.msservices.serviceexplorer,
114114
com.microsoft.tooling.msservices.serviceexplorer.azure,
115+
com.microsoft.tooling.msservices.serviceexplorer.azure.arm.deployments,
115116
com.microsoft.tooling.msservices.serviceexplorer.azure.container,
116117
com.microsoft.tooling.msservices.serviceexplorer.azure.docker,
117118
com.microsoft.tooling.msservices.serviceexplorer.azure.rediscache,

PluginsAndFeatures/azure-toolkit-for-intellij/resources/META-INF/plugin.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
<fileEditorProvider implementation="com.microsoft.intellij.helpers.containerregistry.ContainerRegistryPropertyViewProvider"/>
8383
<fileEditorProvider implementation="com.microsoft.intellij.helpers.webapp.WebAppPropertyViewProvider"/>
8484
<fileEditorProvider implementation="com.microsoft.intellij.helpers.webapp.DeploymentSlotPropertyViewProvider"/>
85+
<fileEditorProvider implementation="com.microsoft.intellij.helpers.arm.DeploymentPropertyViewProvider"/>
86+
<fileEditorProvider implementation="com.microsoft.intellij.helpers.arm.ResourceTemplateViewProvider"/>
8587
<toolWindow
8688
anchor="left"
8789
factoryClass="com.microsoft.intellij.components.ServerExplorerToolWindowFactory"
@@ -116,6 +118,14 @@
116118
<programRunner implementation="com.microsoft.azure.hdinsight.spark.run.CosmosServerlessSparkBatchRunner" />
117119
<configurationType implementation="com.microsoft.intellij.runner.container.AzureDockerSupportConfigurationType"/>
118120
<errorHandler implementation="com.microsoft.intellij.feedback.MSErrorReportHandler" />
121+
122+
<fileTypeFactory implementation="com.microsoft.intellij.language.arm.file.ARMFileTypeFactory"/>
123+
<lang.syntaxHighlighterFactory key="arm"
124+
implementationClass="com.microsoft.intellij.language.arm.editor.ARMSyntaxHighlightFactory"/>
125+
<lang.parserDefinition language="arm"
126+
implementationClass="com.microsoft.intellij.language.arm.parser.ARMParserDefinition"/>
127+
<completion.contributor language="JSON" order="first"
128+
implementationClass="com.microsoft.intellij.language.arm.codeinsight.ARMCompletionContributor"/>
119129
</extensions>
120130

121131
<application-components>
82 Bytes
Loading
82 Bytes
Loading
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.microsoft.intellij.forms.arm.CreateDeploymentForm">
3+
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
4+
<margin top="10" left="10" bottom="10" right="10"/>
5+
<constraints>
6+
<xy x="48" y="54" width="522" height="688"/>
7+
</constraints>
8+
<properties/>
9+
<border type="none"/>
10+
<children>
11+
<grid id="2278d" layout-manager="GridLayoutManager" row-count="8" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
12+
<margin top="0" left="0" bottom="0" right="0"/>
13+
<constraints>
14+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
15+
</constraints>
16+
<properties/>
17+
<border type="none"/>
18+
<children>
19+
<component id="dca18" class="javax.swing.JLabel">
20+
<constraints>
21+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
22+
</constraints>
23+
<properties>
24+
<text value="Deployment Name:"/>
25+
</properties>
26+
</component>
27+
<component id="7bc9d" class="javax.swing.JTextField" binding="deploymentNameTextField">
28+
<constraints>
29+
<grid row="0" column="1" row-span="1" col-span="3" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false">
30+
<preferred-size width="150" height="-1"/>
31+
</grid>
32+
</constraints>
33+
<properties/>
34+
</component>
35+
<component id="bf2d1" class="javax.swing.JLabel">
36+
<constraints>
37+
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
38+
</constraints>
39+
<properties>
40+
<requestFocusEnabled value="true"/>
41+
<text value="Subscription:"/>
42+
</properties>
43+
</component>
44+
<component id="183d5" class="javax.swing.JComboBox" binding="subscriptionCb">
45+
<constraints>
46+
<grid row="1" column="1" row-span="1" col-span="3" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
47+
</constraints>
48+
<properties/>
49+
</component>
50+
<component id="7a76a" class="javax.swing.JLabel">
51+
<constraints>
52+
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
53+
</constraints>
54+
<properties>
55+
<text value="Resource Group:"/>
56+
</properties>
57+
</component>
58+
<component id="40ee6" class="javax.swing.JRadioButton" binding="useExistingRgButton">
59+
<constraints>
60+
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
61+
</constraints>
62+
<properties>
63+
<selected value="true"/>
64+
<text value="Use Existing"/>
65+
</properties>
66+
</component>
67+
<component id="42d34" class="javax.swing.JRadioButton" binding="createNewRgButton">
68+
<constraints>
69+
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
70+
</constraints>
71+
<properties>
72+
<selected value="false"/>
73+
<text value="Create New"/>
74+
</properties>
75+
</component>
76+
<component id="96616" class="javax.swing.JComboBox" binding="rgNameCb">
77+
<constraints>
78+
<grid row="3" column="1" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
79+
</constraints>
80+
<properties>
81+
<editable value="false"/>
82+
<enabled value="true"/>
83+
<model/>
84+
</properties>
85+
</component>
86+
<component id="73ec6" class="javax.swing.JLabel">
87+
<constraints>
88+
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
89+
</constraints>
90+
<properties>
91+
<text value="Resource Template:"/>
92+
</properties>
93+
</component>
94+
<component id="78c76" class="javax.swing.JTextField" binding="rgNameTextFiled">
95+
<constraints>
96+
<grid row="4" column="1" row-span="1" col-span="3" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
97+
<preferred-size width="150" height="-1"/>
98+
</grid>
99+
</constraints>
100+
<properties/>
101+
</component>
102+
<component id="69b6b" class="javax.swing.JLabel" binding="usingExistRgRegionDetailLabel">
103+
<constraints>
104+
<grid row="5" column="2" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
105+
</constraints>
106+
<properties>
107+
<text value=""/>
108+
</properties>
109+
</component>
110+
<component id="289d7" class="javax.swing.JLabel" binding="usingExistRgRegionLabel">
111+
<constraints>
112+
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
113+
</constraints>
114+
<properties>
115+
<text value="Region:"/>
116+
</properties>
117+
</component>
118+
<component id="5e987" class="javax.swing.JLabel" binding="createNewRgRegionLabel">
119+
<constraints>
120+
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
121+
</constraints>
122+
<properties>
123+
<text value="Region:"/>
124+
</properties>
125+
</component>
126+
<component id="8595e" class="javax.swing.JComboBox" binding="regionCb">
127+
<constraints>
128+
<grid row="6" column="2" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
129+
</constraints>
130+
<properties/>
131+
</component>
132+
<component id="dbf75" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="templateTextField">
133+
<constraints>
134+
<grid row="7" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
135+
<preferred-size width="150" height="-1"/>
136+
</grid>
137+
</constraints>
138+
<properties/>
139+
</component>
140+
<component id="7d8bf" class="com.intellij.ui.HyperlinkLabel" binding="lblTemplateHover">
141+
<constraints>
142+
<grid row="7" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
143+
</constraints>
144+
<properties>
145+
<text value=""/>
146+
</properties>
147+
</component>
148+
</children>
149+
</grid>
150+
</children>
151+
</grid>
152+
</form>

0 commit comments

Comments
 (0)