Skip to content

Commit 66ef883

Browse files
Refactored and improved eav attribute generations. Moved fields on the forms and changed validation.
1 parent a939aa6 commit 66ef883

File tree

6 files changed

+326
-134
lines changed

6 files changed

+326
-134
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewCategoryEavAttributeDialog.form

Lines changed: 106 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<grid id="28350" binding="contentPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="10" left="10" bottom="10" right="10"/>
55
<constraints>
6-
<xy x="-1" y="5" width="764" height="764"/>
6+
<xy x="-1" y="5" width="764" height="805"/>
77
</constraints>
88
<properties>
99
<enabled value="true"/>
1010
<preferredSize width="800" height="800"/>
1111
</properties>
1212
<border type="none"/>
1313
<children>
14-
<grid id="6fc7e" layout-manager="GridLayoutManager" row-count="11" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
14+
<grid id="6fc7e" layout-manager="GridLayoutManager" row-count="16" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
1515
<margin top="0" left="0" bottom="0" right="0"/>
1616
<constraints>
1717
<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"/>
@@ -23,7 +23,7 @@
2323
<children>
2424
<component id="7248b" class="javax.swing.JLabel">
2525
<constraints>
26-
<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">
26+
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
2727
<preferred-size width="144" height="15"/>
2828
</grid>
2929
</constraints>
@@ -33,25 +33,15 @@
3333
</component>
3434
<component id="11452" class="javax.swing.JTextField" binding="codeTextField">
3535
<constraints>
36-
<grid row="1" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
36+
<grid row="3" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
3737
<preferred-size width="150" height="-1"/>
3838
</grid>
3939
</constraints>
4040
<properties/>
4141
</component>
42-
<component id="ced84" class="javax.swing.JLabel">
43-
<constraints>
44-
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
45-
<preferred-size width="144" height="15"/>
46-
</grid>
47-
</constraints>
48-
<properties>
49-
<text value="Label"/>
50-
</properties>
51-
</component>
5242
<component id="eee14" class="javax.swing.JLabel">
5343
<constraints>
54-
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
44+
<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">
5545
<preferred-size width="144" height="15"/>
5646
</grid>
5747
</constraints>
@@ -61,23 +51,15 @@
6151
</component>
6252
<component id="26858" class="javax.swing.JTextField" binding="groupTextField">
6353
<constraints>
64-
<grid row="4" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
65-
<preferred-size width="150" height="-1"/>
66-
</grid>
67-
</constraints>
68-
<properties/>
69-
</component>
70-
<component id="ec512" class="javax.swing.JTextField" binding="labelTextField">
71-
<constraints>
72-
<grid row="3" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
54+
<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">
7355
<preferred-size width="150" height="-1"/>
7456
</grid>
7557
</constraints>
7658
<properties/>
7759
</component>
7860
<component id="20b6c" class="javax.swing.JLabel">
7961
<constraints>
80-
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
62+
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
8163
<preferred-size width="144" height="15"/>
8264
</grid>
8365
</constraints>
@@ -87,7 +69,7 @@
8769
</component>
8870
<component id="2c543" class="javax.swing.JLabel">
8971
<constraints>
90-
<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">
72+
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
9173
<preferred-size width="144" height="15"/>
9274
</grid>
9375
</constraints>
@@ -97,15 +79,15 @@
9779
</component>
9880
<component id="4c86b" class="javax.swing.JTextField" binding="dataPatchNameTextField">
9981
<constraints>
100-
<grid row="2" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
82+
<grid row="5" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
10183
<preferred-size width="150" height="-1"/>
10284
</grid>
10385
</constraints>
10486
<properties/>
10587
</component>
10688
<component id="e7353" class="javax.swing.JLabel">
10789
<constraints>
108-
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
90+
<grid row="12" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
10991
<preferred-size width="144" height="15"/>
11092
</grid>
11193
</constraints>
@@ -115,7 +97,7 @@
11597
</component>
11698
<component id="3ac94" class="javax.swing.JComboBox" binding="typeComboBox">
11799
<constraints>
118-
<grid row="8" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
100+
<grid row="12" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
119101
</constraints>
120102
<properties/>
121103
</component>
@@ -129,7 +111,7 @@
129111
</component>
130112
<component id="8675d" class="javax.swing.JLabel">
131113
<constraints>
132-
<grid row="10" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
114+
<grid row="14" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
133115
<preferred-size width="144" height="15"/>
134116
</grid>
135117
</constraints>
@@ -139,7 +121,7 @@
139121
</component>
140122
<component id="3084d" class="javax.swing.JTextField" binding="sortOrderTextField">
141123
<constraints>
142-
<grid row="10" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
124+
<grid row="14" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
143125
<preferred-size width="150" height="-1"/>
144126
</grid>
145127
</constraints>
@@ -159,19 +141,19 @@
159141
</component>
160142
<component id="3c7c1" class="javax.swing.JComboBox" binding="inputComboBox">
161143
<constraints>
162-
<grid row="5" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
144+
<grid row="9" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
163145
</constraints>
164146
<properties/>
165147
</component>
166148
<component id="d345e" class="javax.swing.JComboBox" binding="scopeComboBox">
167149
<constraints>
168-
<grid row="9" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
150+
<grid row="13" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
169151
</constraints>
170152
<properties/>
171153
</component>
172154
<component id="230fe" class="javax.swing.JLabel">
173155
<constraints>
174-
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
156+
<grid row="13" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
175157
<preferred-size width="144" height="15"/>
176158
</grid>
177159
</constraints>
@@ -182,7 +164,7 @@
182164
<grid id="77358" binding="sourcePanel" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
183165
<margin top="0" left="0" bottom="0" right="0"/>
184166
<constraints>
185-
<grid row="6" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
167+
<grid row="10" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
186168
</constraints>
187169
<properties>
188170
<focusable value="true"/>
@@ -211,10 +193,10 @@
211193
</component>
212194
</children>
213195
</grid>
214-
<grid id="bd748" binding="customSourceModelPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
196+
<grid id="bd748" binding="customSourceModelPanel" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
215197
<margin top="0" left="0" bottom="0" right="0"/>
216198
<constraints>
217-
<grid row="7" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
199+
<grid row="11" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
218200
</constraints>
219201
<properties>
220202
<visible value="true"/>
@@ -224,14 +206,14 @@
224206
<component id="93f75" class="javax.swing.JLabel">
225207
<constraints>
226208
<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">
227-
<preferred-size width="100" height="15"/>
209+
<preferred-size width="144" height="15"/>
228210
</grid>
229211
</constraints>
230212
<properties>
231213
<text value="Source Model Directory"/>
232214
</properties>
233215
</component>
234-
<component id="1e113" class="javax.swing.JTextField" binding="sourceModelDirectoryTexField">
216+
<component id="1e113" class="javax.swing.JTextField" binding="sourceModelDirectoryTextField">
235217
<constraints>
236218
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
237219
<preferred-size width="150" height="-1"/>
@@ -241,26 +223,107 @@
241223
<text value=""/>
242224
</properties>
243225
</component>
244-
<component id="ab01b" class="javax.swing.JTextField" binding="sourceModelNameTexField">
226+
<component id="ab01b" class="javax.swing.JTextField" binding="sourceModelNameTextField">
245227
<constraints>
246-
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
228+
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
247229
<preferred-size width="150" height="-1"/>
248230
</grid>
249231
</constraints>
250232
<properties/>
251233
</component>
252234
<component id="c2c06" class="javax.swing.JLabel">
253235
<constraints>
254-
<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">
255-
<preferred-size width="100" height="15"/>
236+
<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">
237+
<preferred-size width="144" height="15"/>
256238
</grid>
257239
</constraints>
258240
<properties>
259241
<text value="Source Model Name"/>
260242
</properties>
261243
</component>
244+
<component id="908eb" class="javax.swing.JLabel" binding="sourceModelDirectoryTextFieldErrorMessage">
245+
<constraints>
246+
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
247+
</constraints>
248+
<properties>
249+
<text value="Label"/>
250+
<visible value="false"/>
251+
</properties>
252+
</component>
253+
<component id="67939" class="javax.swing.JLabel" binding="sourceModelNameTextFieldErrorMessage">
254+
<constraints>
255+
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
256+
</constraints>
257+
<properties>
258+
<text value="Label"/>
259+
<visible value="false"/>
260+
</properties>
261+
</component>
262262
</children>
263263
</grid>
264+
<component id="ced84" class="javax.swing.JLabel">
265+
<constraints>
266+
<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">
267+
<preferred-size width="144" height="15"/>
268+
</grid>
269+
</constraints>
270+
<properties>
271+
<text value="Label"/>
272+
</properties>
273+
</component>
274+
<component id="ec512" class="javax.swing.JTextField" binding="labelTextField">
275+
<constraints>
276+
<grid row="1" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
277+
<preferred-size width="150" height="-1"/>
278+
</grid>
279+
</constraints>
280+
<properties/>
281+
</component>
282+
<component id="dcc26" class="javax.swing.JLabel" binding="labelTextFieldErrorMessage">
283+
<constraints>
284+
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
285+
</constraints>
286+
<properties>
287+
<text value="Label"/>
288+
<visible value="false"/>
289+
</properties>
290+
</component>
291+
<component id="915dd" class="javax.swing.JLabel" binding="codeTextFieldErrorMessage">
292+
<constraints>
293+
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
294+
</constraints>
295+
<properties>
296+
<text value="Label"/>
297+
<visible value="false"/>
298+
</properties>
299+
</component>
300+
<component id="43170" class="javax.swing.JLabel" binding="dataPatchNameTextFieldErrorMessage">
301+
<constraints>
302+
<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"/>
303+
</constraints>
304+
<properties>
305+
<text value="Label"/>
306+
<visible value="false"/>
307+
</properties>
308+
</component>
309+
<component id="25a0d" class="javax.swing.JLabel" binding="groupTextFieldErrorMessage">
310+
<constraints>
311+
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
312+
</constraints>
313+
<properties>
314+
<text value="Label"/>
315+
<visible value="false"/>
316+
</properties>
317+
</component>
318+
<component id="d47b9" class="javax.swing.JLabel" binding="sortOrderTextFieldErrorMessage">
319+
<constraints>
320+
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
321+
</constraints>
322+
<properties>
323+
<text value="Label"/>
324+
<visible value="false"/>
325+
</properties>
326+
</component>
264327
</children>
265328
</grid>
266329
<hspacer id="75d92">

0 commit comments

Comments
 (0)