Skip to content

Commit 7bc4810

Browse files
Merge branch '4.4.0-develop' into pre-release-4.4.0
2 parents ae64e57 + a1aef14 commit 7bc4810

File tree

8 files changed

+68
-38
lines changed

8 files changed

+68
-38
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!---
2+
You can describe your module here.
3+
We recommend that you add the following information:
4+
- implementation details: why and how to use the module, preferably with some example scenarios
5+
- any dependencies (usually other modules but could be any important dependencies, libraries, etc)
6+
- extension points, APIs, plug-ins, etc
7+
- any introduced events
8+
-->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<html>
2+
<body>
3+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; border-color:#111111">
4+
<tr>
5+
<td colspan="3"><font face="verdana" size="-1">This is a template is used to describe the MD file. It contains a code fragment that can be included into file templates
6+
(<b>Templates</b> tab) with the help of the <b>#parse</b> directive.<br>
7+
The template is editable. Along with the static text, code and comments.</font><br>
8+
</td>
9+
</tr>
10+
</table>
11+
</body>
12+
</html>
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
# ${PACKAGE}_${MODULE_NAME} module
22

3-
<!---
4-
You can describe your module here.
5-
We recommend that you add the following information:
6-
- implementation details: why and how to use the module, preferably with some example scenarios
7-
- any dependencies (usually other modules but could be any important dependencies, libraries, etc)
8-
- extension points, APIs, plug-ins, etc
9-
- any introduced events
10-
-->
3+
#parse("MD File Description.md")

src/com/magento/idea/magento2plugin/actions/context/md/NewReadmeMdAction.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.intellij.ide.fileTemplates.actions.AttributesDefaults;
99
import com.intellij.psi.PsiDirectory;
1010
import com.intellij.psi.PsiFile;
11+
import com.intellij.util.IncorrectOperationException;
1112
import com.magento.idea.magento2plugin.actions.context.AbstractContextAction;
1213
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
1314
import com.magento.idea.magento2plugin.magento.files.ModuleReadmeMdFile;
@@ -41,7 +42,8 @@ protected boolean isVisible(
4142
.split(Package.vendorModuleNameSeparator)[1];
4243

4344
return targetDirectory.getName().equals(magentoModuleName)
44-
&& targetDirectory.equals(moduleDirectory);
45+
&& targetDirectory.equals(moduleDirectory)
46+
&& this.isFileCanBeCreated(moduleDirectory);
4547
}
4648

4749
@Override
@@ -57,4 +59,16 @@ protected AttributesDefaults getProperties(
5759

5860
return defaults;
5961
}
62+
63+
private @NotNull Boolean isFileCanBeCreated(
64+
final @NotNull PsiDirectory moduleDirectory
65+
) {
66+
try {
67+
moduleDirectory.checkCreateFile(ModuleReadmeMdFile.FILE_NAME);
68+
} catch (IncorrectOperationException exception) {
69+
return false;
70+
}
71+
72+
return true;
73+
}
6074
}

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
</constraints>
88
<properties>
99
<enabled value="true"/>
10-
<preferredSize width="800" height="800"/>
10+
<preferredSize width="800" height="700"/>
1111
</properties>
1212
<border type="none"/>
1313
<children>
1414
<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>
17-
<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"/>
17+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="9" fill="0" indent="0" use-parent-layout="false">
18+
<preferred-size width="800" height="-1"/>
19+
</grid>
1820
</constraints>
1921
<properties>
2022
<visible value="true"/>
@@ -334,11 +336,6 @@
334336
</component>
335337
</children>
336338
</grid>
337-
<hspacer id="75d92">
338-
<constraints>
339-
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
340-
</constraints>
341-
</hspacer>
342339
<grid id="181ea" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
343340
<margin top="0" left="0" bottom="0" right="0"/>
344341
<constraints>
@@ -420,6 +417,11 @@
420417
</component>
421418
</children>
422419
</grid>
420+
<vspacer id="596dd">
421+
<constraints>
422+
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
423+
</constraints>
424+
</vspacer>
423425
</children>
424426
</grid>
425427
</form>

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
</constraints>
88
<properties>
99
<enabled value="true"/>
10+
<preferredSize width="600" height="700"/>
1011
</properties>
1112
<border type="none"/>
1213
<children>
1314
<grid id="6fc7e" layout-manager="GridLayoutManager" row-count="18" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
1415
<margin top="0" left="0" bottom="0" right="0"/>
1516
<constraints>
16-
<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"/>
17+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
1718
</constraints>
1819
<properties>
1920
<visible value="true"/>
@@ -374,11 +375,6 @@
374375
</component>
375376
</children>
376377
</grid>
377-
<hspacer id="75d92">
378-
<constraints>
379-
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
380-
</constraints>
381-
</hspacer>
382378
<grid id="181ea" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
383379
<margin top="0" left="0" bottom="0" right="0"/>
384380
<constraints>
@@ -460,6 +456,11 @@
460456
</component>
461457
</children>
462458
</grid>
459+
<vspacer id="5b2c6">
460+
<constraints>
461+
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
462+
</constraints>
463+
</vspacer>
463464
</children>
464465
</grid>
465466
</form>

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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="959"/>
6+
<xy x="-1" y="5" width="764" height="997"/>
77
</constraints>
88
<properties>
99
<enabled value="true"/>
@@ -14,7 +14,7 @@
1414
<grid id="6fc7e" layout-manager="GridLayoutManager" row-count="20" 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>
17-
<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"/>
17+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
1818
</constraints>
1919
<properties>
2020
<visible value="true"/>
@@ -197,14 +197,6 @@
197197
<text value=""/>
198198
</properties>
199199
</component>
200-
<component id="ab01b" class="javax.swing.JTextField" binding="sourceModelNameTextField">
201-
<constraints>
202-
<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">
203-
<preferred-size width="150" height="-1"/>
204-
</grid>
205-
</constraints>
206-
<properties/>
207-
</component>
208200
<component id="c2c06" class="javax.swing.JLabel">
209201
<constraints>
210202
<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">
@@ -233,6 +225,14 @@
233225
<visible value="false"/>
234226
</properties>
235227
</component>
228+
<component id="ab01b" class="javax.swing.JTextField" binding="sourceModelNameTextField">
229+
<constraints>
230+
<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">
231+
<preferred-size width="150" height="-1"/>
232+
</grid>
233+
</constraints>
234+
<properties/>
235+
</component>
236236
</children>
237237
</grid>
238238
<grid id="27880" binding="applyToPanel" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
@@ -426,11 +426,6 @@
426426
</component>
427427
</children>
428428
</grid>
429-
<hspacer id="75d92">
430-
<constraints>
431-
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
432-
</constraints>
433-
</hspacer>
434429
<grid id="181ea" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
435430
<margin top="0" left="0" bottom="0" right="0"/>
436431
<constraints>
@@ -512,6 +507,11 @@
512507
</component>
513508
</children>
514509
</grid>
510+
<vspacer id="bf635">
511+
<constraints>
512+
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
513+
</constraints>
514+
</vspacer>
515515
</children>
516516
</grid>
517517
</form>

src/com/magento/idea/magento2plugin/actions/generation/dialog/eavattribute/EavAttributeDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ protected void onOk() {
268268
generateDataPatchFile(eavEntityDataInterface);
269269
generateExtraFilesAfterDataPatchGeneration(eavEntityDataInterface);
270270

271-
setVisible(false);
271+
exit();
272272
}
273273

274274
protected void generateSourceModelFile() {

0 commit comments

Comments
 (0)