Skip to content

Commit 30f61d5

Browse files
authored
Merge branch '3.0.0-develop' into add_template_desc_to_regular_class
2 parents c8464cc + 4a6818c commit 30f61d5

13 files changed

+132
-49
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Run automated tests
55

66
on:
77
pull_request:
8-
branches: [ master, 2.1.0-develop ]
8+
branches: [ master, 3.0.0-develop ]
99

1010
jobs:
1111
build-linux:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
66

7+
## 3.0.0
8+
79
## 2.1.0
810

911
### Added

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ repositories {
1515
}
1616

1717
group 'com.magento.idea'
18-
version '2.1.0'
18+
version '3.0.0'
1919

2020
apply plugin: 'org.jetbrains.intellij'
2121
apply plugin: 'java'
2222
apply plugin: 'groovy'
2323
apply plugin: 'org.jetbrains.changelog'
2424

25-
def phpPluginVersion = System.getProperty("phpPluginVersion", "201.7223.91")
26-
def ideaVersion = System.getProperty("ideaVersion", "2020.1.1")
25+
def phpPluginVersion = System.getProperty("phpPluginVersion", "202.8194.11")
26+
def ideaVersion = System.getProperty("ideaVersion", "2020.2.4")
2727
def javaVersion = 1.8
2828

2929
sourceCompatibility = javaVersion

resources/META-INF/plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<idea-plugin>
88
<id>com.magento.idea.magento2plugin</id>
99
<name>Magento PhpStorm</name>
10-
<version>2.1.0</version>
10+
<version>3.0.0</version>
1111
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>
1212

1313
<description><![CDATA[
@@ -24,7 +24,7 @@
2424
</change-notes>
2525

2626
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Build+Number+Ranges for description -->
27-
<idea-version since-build="201.7223.91"/>
27+
<idea-version since-build="202.8194.7"/>
2828

2929
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
3030
on how to target different products -->

resources/fileTemplates/internal/Magento Form Button Block Class.php.html

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@
55
*/
66
-->
77
<html lang="en">
8-
<body>
9-
</body>
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td>
12+
<font face="verdana" size="-1">
13+
A Magento 2 <a href="https://devdocs.magento.com/guides/v2.4/ui_comp_guide/components/ui-form.html">UI Component Form</a> can have buttons to perform actions on the form such as "Back" or "Save" for example.
14+
</font><br>
15+
</td>
16+
</tr>
17+
</table>
18+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
19+
<tr>
20+
<td colspan="3"><font face="verdana" size="-1">Predefined variables will take the following values:</font></td>
21+
</tr>
22+
<tr>
23+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAMESPACE}</b></font></nobr></td>
24+
<td width="10">&nbsp;</td>
25+
<td width="100%" valign="top"><font face="verdana" size="-1">Namespace for the UI Component Form button class</font></td>
26+
</tr>
27+
<tr>
28+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${CLASS_NAME}</b></font></nobr></td>
29+
<td width="10">&nbsp;</td>
30+
<td width="100%" valign="top"><font face="verdana" size="-1">Class name for the UI Component Form button class</font></td>
31+
</tr>
32+
</table>
33+
</body>
1034
</html>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
Magento uses an active record pattern strategy for persistence. In this system, the model object contains a resource model that maps an object to one or more database rows. A resource model is responsible for performing functions such as: Executing all CRUD (create, read, update, delete) requests.
13+
</font><br>
14+
</td>
15+
</tr>
16+
<tr>
17+
<td><font face="verdana" size="-1">
18+
Link to documentation
19+
<a href="https://devdocs.magento.com/guides/v2.4/architecture/archi_perspectives/persist_layer.html?itm_source=devdocs&itm_medium=quick_search&itm_campaign=federated_search&itm_term=Resource%20Mode">
20+
DevDocs</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 the 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 the PHP class that the Class implements.
61+
</font>
62+
</td>
63+
</tr>
64+
<tr>
65+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${DB_NAME}</b></font></nobr></td>
66+
<td width="10">&nbsp;</td>
67+
<td width="100%" valign="top"><font face="verdana" size="-1">Target table name.
68+
</font>
69+
</td>
70+
</tr>
71+
<tr>
72+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${ENTITY_ID_COLUMN}</b></font></nobr></td>
73+
<td width="10">&nbsp;</td>
74+
<td width="100%" valign="top"><font face="verdana" size="-1">Target table's primary column name.
75+
</font>
76+
</td>
77+
</tr>
78+
</table>
79+
</body>
80+
</html>

resources/fileTemplates/internal/Magento UI Component Form XML.xml.html

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,5 @@
55
*/
66
-->
77
<html lang="en">
8-
<body>
9-
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10-
<tr>
11-
<td>
12-
<font face="verdana" size="-1">
13-
A Magento 2 <a href="https://devdocs.magento.com/guides/v2.4/ui_comp_guide/components/ui-form.html">UI Component Form</a> can have buttons to perform actions on the form such as "Back" or "Save" for example.
14-
</font><br>
15-
</td>
16-
</tr>
17-
</table>
18-
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
19-
<tr>
20-
<td colspan="3"><font face="verdana" size="-1">Predefined variables will take the following values:</font></td>
21-
</tr>
22-
<tr>
23-
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAMESPACE}</b></font></nobr></td>
24-
<td width="10">&nbsp;</td>
25-
<td width="100%" valign="top"><font face="verdana" size="-1">Namespace for the UI Component Form button class</font></td>
26-
</tr>
27-
<tr>
28-
<td valign="top"><nobr><font face="verdana" size="-2"><b>${CLASS_NAME}</b></font></nobr></td>
29-
<td width="10">&nbsp;</td>
30-
<td width="100%" valign="top"><font face="verdana" size="-1">Class name for the UI Component Form button class</font></td>
31-
</tr>
32-
</table>
33-
</body>
8+
<body></body>
349
</html>

src/com/magento/idea/magento2plugin/linemarker/graphql/GraphQlResolverClassLineMarkerProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
package com.magento.idea.magento2plugin.linemarker.graphql;
67

78
import com.intellij.codeInsight.daemon.LineMarkerInfo;
@@ -29,7 +30,7 @@ public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
2930
}
3031

3132
@Override
32-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> collection) {
33+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> collection) {
3334
if (psiElements.size() > 0) {
3435
if (!Settings.isEnabled(psiElements.get(0).getProject())) {
3536
return;

src/com/magento/idea/magento2plugin/linemarker/php/ClassConfigurationLineMarkerProvider.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/**
1+
/*
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
package com.magento.idea.magento2plugin.linemarker.php;
67

78
import com.intellij.codeInsight.daemon.LineMarkerInfo;
@@ -13,32 +14,32 @@
1314
import com.jetbrains.php.lang.psi.elements.PhpClass;
1415
import com.magento.idea.magento2plugin.indexes.XmlIndex;
1516
import com.magento.idea.magento2plugin.project.Settings;
16-
import org.jetbrains.annotations.NotNull;
17-
import org.jetbrains.annotations.Nullable;
18-
1917
import java.util.ArrayList;
2018
import java.util.Collection;
2119
import java.util.Comparator;
2220
import java.util.List;
21+
import org.jetbrains.annotations.NotNull;
22+
import org.jetbrains.annotations.Nullable;
2323

2424
/**
2525
* Created by dkvashnin on 11/15/15.
2626
*/
2727
public class ClassConfigurationLineMarkerProvider implements LineMarkerProvider {
28+
2829
@Nullable
2930
@Override
3031
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
3132
return null;
3233
}
3334

3435
@Override
35-
public void collectSlowLineMarkers(@NotNull List<PsiElement> list, @NotNull Collection<LineMarkerInfo> collection) {
36-
if (list.size() > 0) {
37-
if (!Settings.isEnabled(list.get(0).getProject())) {
36+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> elements, @NotNull Collection<? super LineMarkerInfo<?>> result) {
37+
if (elements.size() > 0) {
38+
if (!Settings.isEnabled(elements.get(0).getProject())) {
3839
return;
3940
}
4041
}
41-
for (PsiElement psiElement: list) {
42+
for (PsiElement psiElement: elements) {
4243
if (psiElement instanceof PhpClass) {
4344
List<XmlTag> results = new ArrayList<XmlTag>();
4445

@@ -57,7 +58,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> list, @NotNull Coll
5758

5859
PsiElement className = ((PhpClass) psiElement).getNameIdentifier();
5960
if (className != null) {
60-
collection.add(builder.createLineMarkerInfo(className));
61+
result.add(builder.createLineMarkerInfo(className));
6162
}
6263
}
6364
}

src/com/magento/idea/magento2plugin/linemarker/php/GraphQlResolverUsageLineMarkerProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
2828
}
2929

3030
@Override
31-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> collection) {
31+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> collection) {
3232
if (psiElements.size() > 0) {
3333
if (!Settings.isEnabled(psiElements.get(0).getProject())) {
3434
return;

0 commit comments

Comments
 (0)