Skip to content

Commit b0172d3

Browse files
author
Vitaliy Boyko
committed
Merge branch '4.3.0-develop' of github.com:magento/magento2-phpstorm-plugin into mainline-eav-attr-code-genearators
� Conflicts: � resources/magento2/validation.properties � src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/annotation/RuleRegistry.java
2 parents 3f3a956 + e2c1e88 commit b0172d3

File tree

120 files changed

+5692
-725
lines changed

Some content is hidden

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

120 files changed

+5692
-725
lines changed

resources/META-INF/plugin.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
<action id="MagentoCreateViewFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewViewXmlAction"/>
7676
<action id="MagentoCreateWebapiFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewWebapiXmlAction"/>
7777
<action id="MagentoCreateWidgetFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewWidgetXmlAction"/>
78+
<action id="MagentoCreateLayoutFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewLayoutXmlAction"/>
7879
<!-- Context dependent actions -->
7980
<separator/>
8081
<add-to-group group-id="NewGroup" anchor="before" relative-to-action="NewXml"/>
@@ -125,7 +126,10 @@
125126
<action id="InjectAViewModelAction.Menu" class="com.magento.idea.magento2plugin.actions.generation.InjectAViewModelAction">
126127
<add-to-group group-id="EditorPopupMenu"/>
127128
</action>
128-
<action id="OverrideInTheme.Menu" class="com.magento.idea.magento2plugin.actions.generation.OverrideInThemeAction">
129+
<action id="OverrideTemplateInTheme.Menu" class="com.magento.idea.magento2plugin.actions.generation.OverrideTemplateInThemeAction">
130+
<add-to-group group-id="ProjectViewPopupMenu"/>
131+
</action>
132+
<action id="OverrideLayoutInTheme.Menu" class="com.magento.idea.magento2plugin.actions.generation.OverrideLayoutInThemeAction">
129133
<add-to-group group-id="ProjectViewPopupMenu"/>
130134
</action>
131135
<action id="MagentoCreateAWebApiDeclaration.Menu" class="com.magento.idea.magento2plugin.actions.generation.NewWebApiDeclarationAction">
@@ -134,6 +138,12 @@
134138
<action id="MagentoCreateAWebApiInterfaceForService.Menu" class="com.magento.idea.magento2plugin.actions.generation.NewWebApiInterfaceAction">
135139
<add-to-group group-id="EditorPopupMenu"/>
136140
</action>
141+
<action id="MagentoInjectConstructorArgumentAction.Menu" class="com.magento.idea.magento2plugin.actions.generation.InjectConstructorArgumentAction">
142+
<add-to-group group-id="EditorPopupMenu"/>
143+
</action>
144+
<action id="MagentoCompareTemplate.Menu" class="com.magento.idea.magento2plugin.actions.comparator.CompareTemplateAction">
145+
<add-to-group group-id="EditorPopupMenu"/>
146+
</action>
137147

138148
<action id="CopyMagentoPath"
139149
class="com.magento.idea.magento2plugin.actions.CopyMagentoPath"
@@ -616,5 +626,7 @@
616626
<frameworkProjectConfigurableProvider implementation="com.magento.idea.magento2plugin.project.ConfigurableProvider"/>
617627
<frameworkUsageProvider implementation="com.magento.idea.magento2plugin.project.UsagesProvider"/>
618628
<libraryRoot id="phpstorm.meta.php" path="/.phpstorm.meta.php/" runtime="false"/>
629+
630+
<referenceResolver2 implementation="com.magento.idea.magento2plugin.lang.php.MagentoProxyDeclarationFilter" order="first"/>
619631
</extensions>
620632
</idea-plugin>

resources/fileTemplates/internal/Magento CLI Command Class.php.ft

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use Symfony\Component\Console\Output\OutputInterface;
1212
class ${NAME} extends Command
1313
{
1414
/**
15-
* @inheritDoc
15+
* Initialization of the command.
1616
*/
1717
protected function configure()
1818
{
@@ -22,7 +22,7 @@ class ${NAME} extends Command
2222
}
2323

2424
/**
25-
* CLI command description
25+
* CLI command description.
2626
*
2727
* @param InputInterface $input
2828
* @param OutputInterface $output

resources/fileTemplates/internal/Magento Collection Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
1717
protected $_eventPrefix = '${DB_NAME}_collection';
1818

1919
/**
20-
* @inheritdoc
20+
* Initialize collection model.
2121
*/
2222
protected function _construct()
2323
{

resources/fileTemplates/internal/Magento Data Model.php.ft

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
1919
{
2020
#if (${PROPERTIES} && !$hasInterface)
2121
/**
22-
* String constants for property names
22+
* String constants for property names.
2323
*/
2424
#set ($properties = ${PROPERTIES})
2525
#foreach ($property in $properties.split(","))
@@ -41,17 +41,11 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
4141
#if(!($foreach.first))
4242

4343
#end
44-
#if ($hasInterface)
45-
/**
46-
* @inheritDoc
47-
*/
48-
#else
4944
/**
5045
* Getter for $propertyUpperCamel.
5146
*
5247
* @return $propertyType|null
5348
*/
54-
#end
5549
public function get$propertyUpperCamel(): ?$propertyType
5650
{
5751
#if($propertyType == 'string')
@@ -62,19 +56,13 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
6256
#end
6357
}
6458

65-
#if ($hasInterface)
66-
/**
67-
* @inheritDoc
68-
*/
69-
#else
7059
/**
7160
* Setter for $propertyUpperCamel.
7261
*
7362
* @param $propertyType|null $$propertyLowerCamel
7463
*
7564
* @return void
7665
*/
77-
#end
7866
public function set$propertyUpperCamel(?$propertyType $$propertyLowerCamel): void
7967
{
8068
$this->setData(self::$propertyUpperSnake, $$propertyLowerCamel);

resources/fileTemplates/internal/Magento Entity Search Results.php.ft

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,21 @@ use $use;
1414
class ${CLASS_NAME} extends ${PARENT_CLASS_NAME} implements ${INTERFACE_NAME}
1515
{
1616
/**
17-
* @inheritDoc
17+
* Set items list.
18+
*
19+
* @param array $items
20+
*
21+
* @return ${INTERFACE_NAME}
1822
*/
1923
public function setItems(array $items): ${INTERFACE_NAME}
2024
{
2125
return parent::setItems($items);
2226
}
2327

2428
/**
25-
* @inheritDoc
29+
* Get items list.
30+
*
31+
* @return array
2632
*/
2733
public function getItems(): array
2834
{

resources/fileTemplates/internal/Magento Grid Ui Component Action Column Class.php.ft

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ class ${CLASS_NAME} extends ${PARENT_CLASS}
2020

2121
/**
2222
* Url paths.
23-
* #@+
2423
*/
2524
private const EDIT_URL_PATH = '${EDIT_URL_PATH}';
2625
private const DELETE_URL_PATH = '${DELETE_URL_PATH}';
27-
/** #@- */
2826

2927
/**
3028
* @var ${URL}
@@ -55,7 +53,11 @@ class ${CLASS_NAME} extends ${PARENT_CLASS}
5553
}
5654

5755
/**
58-
* @inheritDoc
56+
* Prepare data source.
57+
*
58+
* @param array $dataSource
59+
*
60+
* @return array
5961
*/
6062
public function prepareDataSource(array $dataSource): array
6163
{
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?xml version="1.0"?>
22
#parse("XML File Header.xml")
3-
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
3+
#if (${IS_ADMIN} == "true")
4+
#set ($isAdmin = true)
5+
#else
6+
#set ($isAdmin = false)
7+
#end
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #if ($isAdmin)layout="admin-1column"#end
9+
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
410
</page>

resources/fileTemplates/internal/Magento Model Class.php.ft

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
1717
protected $_eventPrefix = '${DB_NAME}_model';
1818

1919
/**
20-
* @inheritdoc
20+
* Initialize magento model.
21+
*
22+
* @return void
2123
*/
2224
protected function _construct()
2325
{

resources/fileTemplates/internal/Magento Resource Model Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
1717
protected $_eventPrefix = '${DB_NAME}_resource_model';
1818

1919
/**
20-
* @inheritdoc
20+
* Initialize resource model.
2121
*/
2222
protected function _construct()
2323
{

resources/fileTemplates/internal/Magento UI Component Custom Data Provider Class.php.ft

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ class ${CLASS_NAME} extends ${EXTENDS}
7676
}
7777

7878
/**
79-
* @inheritDoc
79+
* Returns searching result.
80+
*
81+
* @return ${SEARCH_RESULT_FACTORY}
8082
*/
8183
public function getSearchResult()
8284
{
@@ -119,7 +121,9 @@ class ${CLASS_NAME} extends ${EXTENDS}
119121
}
120122
#else
121123
/**
122-
* @inheritDoc
124+
* Get data.
125+
*
126+
* @return array
123127
*/
124128
public function getData()
125129
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1439] Call Adobe Commerce @deprecated method: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
3+
<p>[1439] Call Magento 2 @deprecated method: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1131] Extending from Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Inheritance is not recommended way of extending Adobe Commerce functionality. Update code to use a class marked as @api.</p>
3+
<p>[1131] Extending from Magento 2 @deprecated class: The extended class will be removed in upcoming versions. Inheritance is not recommended way of extending Magento Open Source|Adobe Commerce functionality. Update code to use a class marked as @api.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1338] Implemented Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
3+
<p>[1338] Implemented Magento 2 @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1132] Importing Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Consider using Adobe Commerce class marked as @api instead.</p>
3+
<p>[1132] Importing Magento 2 @deprecated class: The extended class will be removed in upcoming versions. Consider using Magento Open Source|Adobe Commerce class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1332] Imported Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
3+
<p>[1332] Imported Magento 2 @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
6-
</html>
6+
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1337] Inherited from Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
3+
<p>[1337] Inherited from Magento 2 @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1235] Overriding Adobe Commerce @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
3+
<p>[1235] Overriding Magento 2 @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1535] Overriding Adobe Commerce @deprecated property: The deprecated property will be removed in upcoming versions. Consider relying on methods declared in API interfaces or using a private property within your implementation instead.</p>
3+
<p>[1535] Overriding Magento 2 @deprecated property: The deprecated property will be removed in upcoming versions. Consider relying on methods declared in API interfaces or using a private property within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1134] Using Adobe Commerce @deprecated class: The extended class will be removed in upcoming versions. Consider using Adobe Commerce class marked as @api instead.</p>
3+
<p>[1134] Using Magento 2 @deprecated class: The extended class will be removed in upcoming versions. Consider using Magento Open Source|Adobe Commerce class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1234] Using Adobe Commerce @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
3+
<p>[1234] Using Magento 2 @deprecated constant: The deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1334] Used Adobe Commerce @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
3+
<p>[1334] Used Magento 2 @deprecated interface: The deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<body>
3-
<p>[1534] Using Adobe Commerce @deprecated property: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
3+
<p>[1534] Using Magento 2 @deprecated property: The deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.</p>
44
<!-- tooltip end -->
55
</body>
66
</html>

resources/magento2/common.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ common.template.type=Email Type
7272
common.diagnostic.reportButtonText=Report Me
7373
common.diagnostic.reportSubmittedTitle=The report is successfully submitted!
7474
common.diagnostic.reportSubmittedMessage=Thank you for submitting your report! We will check it as soon as possible.
75+
common.layout.filename=Layout File Name
7576
common.targetMethod=Target Method

resources/magento2/validation.properties

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ validator.alphaAndDashCharacters=The {0} field must contain alphabets and dashes
99
validator.alreadyDeclared={0} is already declared in the {1} module
1010
validator.startWithNumberOrCapitalLetter=The {0} field must start with a number or a capital letter
1111
validator.onlyNumbers=The {0} field must contain numbers only
12+
validator.onlyIntegerOrFloatNumbers=The {0} field must contain only integer or float numbers
1213
validator.mustNotBeNegative={0} must not be negative
1314
validator.identifier=The {0} field must contain letters, numbers, dashes, and underscores only
1415
validator.identifier.colon=The {0} field must contain letters, numbers, colons, dashes, and underscores only
@@ -41,4 +42,9 @@ validator.lowerSnakeCase=The {0} field must be of the lower snake case format
4142
validator.menuIdentifierInvalid=The menu identifier is invalid
4243
validator.someFieldsHaveErrors=Please, check the dialog. Some fields have errors
4344
validator.dbSchema.invalidColumnType=Invalid ''{0}'' column type specified
44-
validator.commaSeparatedString.isNotValid=The {0} field must contain comma separated string without whitespaces
45+
validator.arrayValuesDialog.invalidValueForRowWithName=Invalid value ''{0}'' specified for the row with name ''{1}''
46+
validator.arrayValuesDialog.namesMustBeUnique=Duplicated items names
47+
validator.arrayValuesDialog.nameMustNotBeEmpty=The array name cannot be empty
48+
validator.layoutNameRuleInvalid=The layout name is invalid
49+
validator.layoutNameUnderscoreQtyInvalid=Wrong layout name, please check
50+
validator.commaSeparatedString.isNotValid=The {0} field must contain comma separated string without whitespaces

0 commit comments

Comments
 (0)