You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
The PHPStorm plugin is a tool created by the community to optimize routine coding operations and improve the {{site.data.var.ee}} development experience. The plugin is compatible with IntelliJ IDEA Ultimate and PhpStorm IDE. The functionality includes {{site.data.var.ee}} specific code generation shortcuts, code inspections, autocomplete functionality for configuration files, MFTF tests, and Requirejs.
6
+
The PHPStorm plugin is a tool created by the community to optimize routine coding operations and improve the {{site.data.var.ee}} development experience. The plugin is compatible with the IntelliJ IDEA Ultimate and PhpStorm IDEs. The functionality includes {{site.data.var.ee}} specific code generation shortcuts, code inspections, autocomplete functionality for configuration files, MFTF tests, and RequireJS.
9
7
10
8
See the [Code generation]({{site.baseurl}}/guides/v2.3/ext-best-practices/phpstorm/code-generation.html) topic for more information.
11
9
12
-
The PHPStorm plugin includes shortcuts for Functional Testing, Require JS mapping, GraphQL, Plugin declaration inspection, code generation, and many more.
10
+
The PHPStorm plugin includes shortcuts for functional testing, RequireJS mapping, GraphQL, plugin declaration inspection, code generation, and much more.
13
11
14
12
See the [Adding Code Inspections]({{site.baseurl}}/guides/v2.3/ext-best-practices/phpstorm/inspections.html) topic for more information on static code analysis.
Copy file name to clipboardExpand all lines: src/guides/v2.3/ext-best-practices/phpstorm/inspections.md
+26-22Lines changed: 26 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,23 @@
1
1
---
2
2
group: extension-best-practices
3
-
title: Adding Code Inspections
3
+
title: Adding code inspections
4
4
functional_areas:
5
5
- Standards
6
6
---
7
7
8
-
The IntelliJ Platform provides tools designed for static code analysis called code inspections, which help the user maintain and clean up code without actually executing it.
8
+
The IntelliJ Platform provides tools designed for static code analysis called code inspections, which help you maintain and clean up code without actually executing it.
9
9
Read more in the [official documentation](https://plugins.jetbrains.com/docs/intellij/code-inspections.html).
10
10
11
-
The plugin inspections could be found in the`Settings | Preferences... | Editor | Inspections`.
11
+
you can find plugin inspections in`Settings | Preferences... | Editor | Inspections`.
12
12
Use a filter to find only the plugin inspections: `Magento 2`.
13
13
14
14

15
15
16
16
See [Inspections topic](https://jetbrains.design/intellij/text/inspections/) in the IntelliJ Platform UI Guidelines
17
-
on naming, writing description, and message texts for inspections to avoid basic naming conventions issues before code review.
17
+
for naming, writing descriptions, and messages for inspections to avoid basic naming convention issues before code review.
18
18
19
19
### To add a new inspection
20
+
Adding a new code inspection includes:
20
21
21
22
1. Declaring an inspection in the plugin configuration file
22
23
1. Implementing a local inspection class to inspect code in the IntelliJ Platform-based IDE editor
@@ -28,7 +29,7 @@ on naming, writing description, and message texts for inspections to avoid basic
28
29
29
30
### Declaring an inspection in the plugin configuration file
30
31
31
-
All plugin inspections declared in the `<extensions defaultExtensionNs="com.intellij">` XML node of the plugin configuration file.
32
+
You must declare all plugin inspections in the `<extensions defaultExtensionNs="com.intellij">` XML node of the plugin configuration file.
32
33
33
34
For example, we will implement a local inspection tool for checking preference XML tag attributes (`di.xml` file)
34
35
if they are valid classes FQNs.
@@ -113,9 +114,9 @@ All visitors should extend `com.intellij.psi.PsiElementVisitor`.
So you can just report problem for tag element, as it is done by Intellij Idea inspections, for example: `com.intellij.xml.util.CheckEmptyTagInspection`.
160
+
You cannot access the tag value of the `PsiElement` type.
161
+
You should report problems with the tag element similar to Intellij Idea inspections. For example: `com.intellij.xml.util.CheckEmptyTagInspection`.
161
162
162
163
So, there is a full example: [InvalidDependencyInjectionTypeInspection]
163
164
164
-
### Writing an HTML description of the inspection for display in the inspection preferences panel
165
+
### Writing HTML descriptions
165
166
166
-
You must describe all inspections in the description file. To do this you can add a new HTML file by the next path:
167
+
This section shows you how to display an HTML description of the inspection in the inspection preferences panel.
168
+
169
+
170
+
You must describe all inspections in the description file. To do this, you can add a new HTML file to the following path:
167
171
`./resources/inspectionDescriptions/{shortName}.html`, where `{shortName}` is a `shortName` attribute value in the
168
-
local inspection declaration. Or you can just use Intellij Idea automation for this (preferred way ).
169
-
All inspection implementation classes have highlighted class name if they don't have description file and quick fix to create it:
172
+
local inspection declaration. Or you can just use Intellij Idea automation to do this (preferred).
173
+
All inspection implementation classes have highlighted class names if they don't have description files. Here's a quick fix to create it:
Use [Inspections topic](https://jetbrains.design/intellij/text/inspections/) to write better descriptions for inspections using naming conventions.
173
177
174
178
### Create a unit test for the inspection
175
179
176
-
You must deliver each inspection with the unit test for it. The root folder for all inspections unit tests is a `./tests/com/magento/idea/magento2plugin/inspections`. As base classes for your tests you should use predefined implementations based on languages.
180
+
You must deliver each inspection with the unit test for it. The root folder for all inspections unit tests is `./tests/com/magento/idea/magento2plugin/inspections`. As base classes for your tests you should use predefined implementations based on languages.
177
181
178
182
**Base classes implementations for different languages:**
179
183
@@ -183,8 +187,8 @@ You must deliver each inspection with the unit test for it. The root folder for
If you cover new language area, please extend `com.magento.idea.magento2plugin.inspections.BaseInspectionsTestCase` class and add new abstract class for that area.
187
-
All test classes names should have a suffix Test and all testing methods should have a prefix test and detailed description in the annotation.
190
+
If you cover new language area, please extend the `com.magento.idea.magento2plugin.inspections.BaseInspectionsTestCase` class and add a new abstract class for that area.
191
+
All test class names should have the suffix "test" and all testing methods should have the prefix "test" and detailed description in the annotation.
188
192
Also, you should enable testing inspection in the `setUp()` method.
Copy file name to clipboardExpand all lines: src/guides/v2.3/ext-best-practices/phpstorm/introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
group: extension-best-practices
3
-
title: PHPStorm Plugin
3
+
title: PHPStorm plugin
4
4
functional_areas:
5
5
- Standards
6
6
---
7
7
8
-
The PHPStorm plugin is a tool created by the community to optimize routine coding operations and improve the {{site.data.var.ee}} development experience. The plugin is compatible with IntelliJ IDEA Ultimate and PhpStorm IDE. The functionality includes {{site.data.var.ee}} specific code generation shortcuts, code inspections, autocomplete functionality for configuration files, MFTF tests, and Requirejs.
8
+
The PHPStorm plugin is a tool created by the community to optimize routine coding operations and improve the {{site.data.var.ee}} development experience. The plugin is compatible with the IntelliJ IDEA Ultimate and PhpStorm IDEs. The functionality includes {{site.data.var.ee}} specific code generation shortcuts, code inspections, autocomplete functionality for configuration files, MFTF tests, and RequireJS.
9
9
10
10
See the [Code generation]({{site.baseurl}}/guides/v2.3/ext-best-practices/phpstorm/code-generation.html) topic for more information.
Copy file name to clipboardExpand all lines: src/guides/v2.3/ext-best-practices/phpstorm/uct-run-configuration.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,14 @@ Run Configurations are used to run internal and external processes from within I
11
11
12
12
See the [Run/Debug configurations topic](https://www.jetbrains.com/help/idea/run-debug-configuration.html) in the IntelliJ IDEA to understand the concept of a run configuration.
13
13
14
-
The Run Configuration is a Graphical User Interface (GUI) for the {{site.data.var.uct}}. This allows the {{site.data.var.uct}} instance to be configured via composer. It is recommended that the {{site.data.var.uct}} is installed in the current project. However, if the {{site.data.var.uct}} is located outside the current project, a message is shown alerting of the possibility to download and install {{site.data.var.uct}} in the current project.
14
+
The Run Configuration is a Graphical User Interface (GUI) for the {{site.data.var.uct}}. This allows the {{site.data.var.uct}} instance to be configured using Composer. We recommend that you install the {{site.data.var.uct}} in the current project. However, if the {{site.data.var.uct}} is located outside the current project, a message displays providing an optoin to download and install it in the current project.
15
15
16
16
{:.bs-callout-warning}
17
-
The {{site.data.var.uct}} is an {{site.data.var.ee}} feature. You will need your {{site.data.var.ee}} license key to install it.
17
+
The {{site.data.var.uct}} is an {{site.data.var.ee}} feature. You need your {{site.data.var.ee}} license key to install it.
When you create a new run configuration for a specific tool, create it from one of the dedicated configuration templates, which implement the startup logic, defines the list of parameters and their default values.
21
+
When you create a new run configuration for a specific tool, create it from one of the dedicated configuration templates. Templates implement the startup logic and define the list of parameters and their default values.
22
22
23
23
The {{site.data.var.uct}} Run Configuration template is located in the PHPStorm plugin menu, under **Run/Debug configurations** > **Add New Configuration** > **Upgrade Compatibility Tool**.
24
24
@@ -39,7 +39,7 @@ These are the main components of the {{site.data.var.uct}} Run Configuration tem
39
39
40
40
See [Run]({{site.baseurl}}/upgrade-compatibility-tool/run.html) topic for more information on these specific options of the {{site.data.var.uct}}.
41
41
42
-
Once the template is configured correctly, you can run the {{site.data.var.uct}} via a single click in your Run Configuration GUI.
42
+
After you correctly configure the template, you can run the {{site.data.var.uct}} with a single click in your Run Configuration GUI.
0 commit comments