Skip to content

Commit de2a60c

Browse files
authored
Merge pull request #427 from magento/3.0.2->3.1.0-forwardport
3.0.2 >3.1.0 forwardport
2 parents 2aa1baf + 732680a commit de2a60c

23 files changed

+337
-145
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
66

77
## 3.1.0
88

9+
## 3.0.2
10+
11+
### Fixed
12+
13+
- Fixed the Inject a View Model dialog
14+
915
## 3.0.1
1016

1117
### Fixed

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,13 @@ idea {
103103
generatedSourceDirs += file('gen')
104104
}
105105
}
106+
107+
dependencies {
108+
testImplementation 'junit:junit:4.13'
109+
}
110+
111+
test {
112+
useJUnit()
113+
114+
maxHeapSize = '1G'
115+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!--
2+
/*
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html>
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td><font face="verdana" size="-1">
12+
The Regular Class it is a php class which represents itself template for creating objects.
13+
</font><br>
14+
</td>
15+
</tr>
16+
<tr>
17+
<td><font face="verdana" size="-1">
18+
Link to documentation
19+
<a href="https://www.php.net/manual/en/language.oop5.basic.php">
20+
PHPDocs</a>.
21+
</font><br>
22+
</td>
23+
</tr>
24+
</table>
25+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
26+
<tr>
27+
<td colspan="3"><font face="verdana" size="-1">Predefined variables explanation:</font></td>
28+
</tr>
29+
<tr>
30+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAMESPACE}</b></font></nobr></td>
31+
<td width="10">&nbsp;</td>
32+
<td width="100%" valign="top"><font face="verdana" size="-1">A fully qualified name of the field namespace without a leading slash.
33+
</font>
34+
</td>
35+
</tr>
36+
<tr>
37+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${USE}</b></font></nobr></td>
38+
<td width="10">&nbsp;</td>
39+
<td width="100%" valign="top"><font face="verdana" size="-1">List of imports separated by comma.
40+
</font>
41+
</td>
42+
</tr>
43+
<tr>
44+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAME}</b></font></nobr></td>
45+
<td width="10">&nbsp;</td>
46+
<td width="100%" valign="top"><font face="verdana" size="-1">PHP Class name.
47+
</font>
48+
</td>
49+
</tr>
50+
<tr>
51+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${EXTENDS}</b></font></nobr></td>
52+
<td width="10">&nbsp;</td>
53+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class extends.
54+
</font>
55+
</td>
56+
</tr>
57+
<tr>
58+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${IMPLEMENTS}</b></font></nobr></td>
59+
<td width="10">&nbsp;</td>
60+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class implements.
61+
</font>
62+
</td>
63+
</tr>
64+
</table>
65+
</body>
66+
</html>

resources/magento2/common.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ common.addToolbarListingPaging=Add Toolbar Listing Paging
6262
common.addToolbarListingFilters=Add Toolbar Listing Filters
6363
common.addToolbarFullTextSearch=Add Toolbar Full Text Search
6464
common.addToolbarColumnsControl=Add Toolbar Columns Control
65-
common.addToolbarBookmarks=Add Toolbar Bookmarks
65+
common.addToolbarBookmarks=Add Toolbar Bookmarks
66+
common.argument=Argument name

src/com/magento/idea/magento2plugin/actions/generation/generator/CLICommandDiXmlGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import com.intellij.psi.xml.XmlTag;
1818
import com.magento.idea.magento2plugin.actions.generation.data.CLICommandXmlData;
1919
import com.magento.idea.magento2plugin.actions.generation.generator.util.FindOrCreateDiXml;
20-
import com.magento.idea.magento2plugin.actions.generation.generator.util.GetCodeTemplate;
20+
import com.magento.idea.magento2plugin.actions.generation.generator.util.GetCodeTemplateUtil;
2121
import com.magento.idea.magento2plugin.actions.generation.generator.util.XmlFilePositionUtil;
2222
import com.magento.idea.magento2plugin.magento.files.ModuleDiXml;
2323
import com.magento.idea.magento2plugin.magento.packages.Areas;
@@ -31,7 +31,7 @@
3131
"PMD.UselessParentheses"
3232
})
3333
public class CLICommandDiXmlGenerator extends FileGenerator {
34-
private final GetCodeTemplate getCodeTemplate;
34+
private final GetCodeTemplateUtil getCodeTemplateUtil;
3535
private final FindOrCreateDiXml findOrCreateDiXml;
3636
private final XmlFilePositionUtil positionUtil;
3737
private final CLICommandXmlData cliCommandXmlData;
@@ -50,7 +50,7 @@ public CLICommandDiXmlGenerator(
5050
super(project);
5151
this.cliCommandXmlData = cliCommandXmlData;
5252
this.project = project;
53-
this.getCodeTemplate = GetCodeTemplate.getInstance(project);
53+
this.getCodeTemplateUtil = new GetCodeTemplateUtil(project);
5454
this.findOrCreateDiXml = new FindOrCreateDiXml(project);
5555
this.positionUtil = XmlFilePositionUtil.getInstance();
5656
}
@@ -69,7 +69,7 @@ public PsiFile generate(final String actionName) {
6969
WriteCommandAction.runWriteCommandAction(project, () -> {
7070
final StringBuffer textBuf = new StringBuffer();
7171
try {
72-
final String template = getCodeTemplate.execute(
72+
final String template = getCodeTemplateUtil.execute(
7373
ModuleDiXml.TEMPLATE_CLI_COMMAND,
7474
getAttributes()
7575
);

0 commit comments

Comments
 (0)