Skip to content

Commit f53d864

Browse files
paliarushlenaorobei
authored andcommitted
- Described steps for setting up plugin dev environment
- Bumped version and added release notes (cherry picked from commit 73b5885)
1 parent abbf5cb commit f53d864

File tree

3 files changed

+177
-167
lines changed

3 files changed

+177
-167
lines changed

CHANGELOG.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
0.3.0
2+
=============
3+
* Features:
4+
* Extended navigation from PHP class to its XML declaration to support any configs
5+
* Documented local environment set up for plugin development
6+
* Fixed bugs:
7+
* Fixed NullPointerException
8+
9+
0.2.3
10+
=============
11+
* Features:
12+
* Added JavaScript reference contributor
13+
* Support references for each part of FQN of PHP class, methods, constants
14+
* Support reference from XML/JavaScript for module name
15+
* Support reference from XML/JavaScript for module element path (e.g. Magento_Catalog::product/list/addto/compare.phtml)
16+
* Added project detector
17+
* Move configuration section to "Languages & Frameworks > Php > Magento"
18+
* Remove deprecated elements
19+
20+
0.2.2
21+
=============
22+
* Features:
23+
* Added Module name to configuration tooltip
24+
* Fixed bugs:
25+
* Fixed "Project disposed" exception
26+
27+
0.2.1
28+
=============
29+
* Features:
30+
* added module name for "Goto configuration" labels
31+
32+
0.2.0
33+
=============
34+
* Features:
35+
* WebApi routes
36+
* nicer "Goto configuration" labels
37+
* plugin settings (manual reindex, URN generation, plugin on/off)
38+
39+
0.1
40+
=============
41+
* Features:
42+
* Context type completion for:
43+
* Observers completion only for ObserverInterface impl in events.xml
44+
* Blocks completion only for BlockInterface name in layouts.xml
45+
* Preference configuration in di.xml
46+
* Type hinting for object arguments in di.xml
47+
* @api usage inspection in Module context
48+
* ObjectManager usage inspection in Module context
49+
* virtualType arguments resolution
50+
* webapi.xml interface/method completion/references
51+
* Support for old people using PhpStorm 8 or JDK1.7
52+
53+
0.0.9
54+
=============
55+
* Features:
56+
* Added Reference and completion support for layouts
57+
* block: class, before, after
58+
* referenceBlock: name
59+
* move: element, destination, before, after
60+
* remove: name
61+
* update: handle
62+
* referenceContainer: name
63+
* Line marker reference for php class to Layout configuration
64+
65+
0.0.8
66+
=============
67+
* Features:
68+
* Added Line marker reference for php class/interface to DI configuration
69+
* Added Line marker reference to plugins
70+
71+
0.0.7
72+
=============
73+
* Features:
74+
* Added reference to configuration and observers (classes or virtualType)
75+
* Added reference to observers from configuration
76+
* Added reference to event dispatch from configuration
77+
78+
0.0.6
79+
=============
80+
* Features:
81+
* Added reference and completion support for virtual types/classes/arguments in DI configuration
82+
83+
0.0.5
84+
=============
85+
* Features:
86+
* Added reference support for classes/interfaces in DI configuration

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Setting up development environment
2+
3+
1. Check out this repository
4+
1. Download PhpStorm build specified in the [META-INF/plugin.xml](./META-INF/plugin.xml). Older builds can be found [here](https://confluence.jetbrains.com/display/PhpStorm/Previous+PhpStorm+Releases)
5+
1. Create a new project in the InteliJ. The type of the project must be "InteliJ Platform Plugin". Specify a path to the PhpStorm from the previous step as SDK for this project
6+
1. Instead of creating a project in a new directory, point it to an existing one checked out in the first step. When prompted, replace all configs
7+
1. Revert any local modifications (which were done by the IDE during project creation)
8+
1. Follow [these steps](http://www.jetbrains.org/intellij/sdk/docs/products/phpstorm/setting_up_environment.html) and additionally include dependency on the `javascript-openapi`
9+
1. You may also need to install JDK 1.8
10+
1. To make sure that environment is configured correctly, `Run` the plugin. You should see a new instance of PhpStorm launched with the plugin installed. Make sure that plugin is enabled in PhpStorm settings and indexing is finished. Plugin features should be accessible at this point
11+
12+
# Plugin publication
13+
14+
1. [Build a new version of the plugin](https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/deploying_plugin.html)
15+
1. [Install the newly created archive/jar file from disk](https://www.jetbrains.com/help/idea/managing-plugins.html#installing-plugins-from-disk) for testing
16+
1. [Publish](https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/publishing_plugin.html)

META-INF/plugin.xml

Lines changed: 75 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,79 @@
1-
<idea-plugin version="2">
2-
<id>com.magento.idea.magento2plugin</id>
3-
<name>Magento2</name>
4-
<version>0.2.2</version>
5-
<vendor email="[email protected]" url="https://github.com/dkvashninbay/magento2plugin">Dmytro Kvashnin</vendor>
6-
7-
<description><![CDATA[
8-
Plugin, created to improve life-work balance while working with Magento 2
9-
<br/>
10-
<h3>Features</h3>
11-
<br/>
12-
<h3>Configuration smart completion and references</h3>
13-
<ul>
14-
<li>di.xml</li>
15-
<li>layouts</li>
16-
<li>events.xml</li>
17-
<li>webapi.xml</li>
18-
</ul>
19-
20-
<h3>Inspections</h3>
21-
<ul>
22-
<li>@api usage</li>
23-
<li>ObjectManager usage</li>
24-
</ul>
25-
26-
<h3>Code helpers</h3>
27-
<ul>
28-
<li>"Navigate to configuration" reference in scope of class/interface</li>
29-
<li>"Go to plugin" reference in scope of class/interface and method</li>
30-
<li>"Navigate to Web API configuration" reference in scope of class/interface and method</li>
31-
</ul>
1+
<idea-plugin>
2+
<id>com.magento.idea.magento2plugin</id>
3+
<name>Magento PhpStorm</name>
4+
<version>0.3.0</version>
5+
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>
6+
7+
<description><![CDATA[
8+
Magento PhpStorm plugin, created to improve life-work balance while working with Magento 2
329
]]></description>
3310

34-
<change-notes><![CDATA[
35-
<h3>0.2.1</h3>
36-
<ul>
37-
<li>added module name for "Goto configuration" labels</li>
38-
</ul>
39-
<h3>0.2.0</h3>
40-
<ul>
41-
<li>WebApi routes</li>
42-
<li>nicer "Goto configuration" labels</li>
43-
<li>plugin settings (manual reindex, URN generation, plugin on/off)</li>
44-
</ul>
45-
46-
<h3>0.1</h3>
47-
<ul>
48-
<li>Context type completion for:<br/>
49-
- Observers completion only for ObserverInterface impl in events.xml<br/>
50-
- Blocks completion only for BlockInterface name in layouts.xml<br/>
51-
- Preference configuration in di.xml<br/>
52-
- Type hinting for object arguments in di.xml<br/>
53-
</li>
54-
<li>@api usage inspection in Module context</li>
55-
<li>ObjectManager usage inspection in Module context</li>
56-
<li>virtualType arguments resolution</li>
57-
<li>webapi.xml interface/method completion/references</li>
58-
<li>Support for old people using PhpStorm 8 or JDK1.7</li>
59-
</ul>
60-
61-
<h3>0.0.9</h3>
62-
<ul>
63-
<li>Added Reference and completion support for layouts<br/>
64-
- block: class, before, after<br/>
65-
- referenceBlock: name<br/>
66-
- move: element, destination, before, after<br/>
67-
- remove: name<br/>
68-
- update: handle<br/>
69-
- referenceContainer: name</li>
70-
<li>Line marker reference for php class to Layout configuration</li>
71-
</ul>
72-
73-
<h3>0.0.8</h3>
74-
<ul>
75-
<li>Added Line marker reference for php class/interface to DI configuration</li>
76-
<li>Added Line marker reference to plugins</li>
77-
</ul>
78-
79-
<h3>0.0.7</h3>
80-
<ul>
81-
<li>Added reference to configuration and observers (classes or virtualType)</li>
82-
<li>Added reference to observers from configuration
83-
<li>Added reference to event dispatch from configuration</li>
84-
</ul>
85-
86-
<h3>0.0.6</h3>
87-
<ul>
88-
<li>Added reference and completion support for virtual types/classes/arguments in DI configuration</li>
89-
</ul>
90-
91-
<h3>0.0.5</h3>
92-
<ul>
93-
<li>Added reference support for classes/interfaces in DI configuration</li>
94-
</ul>
11+
<change-notes><![CDATA[
12+
Please, find change notes
13+
<a
14+
href="https://github.com/magento/magento2-phpstorm-plugin/blob/master/CHANGELOG.md"
15+
title="CHANGELOG.md"
16+
>here</a>
9517
]]>
96-
</change-notes>
97-
98-
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Build+Number+Ranges for description -->
99-
<idea-version since-build="139"/>
100-
101-
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
102-
on how to target different products -->
103-
<!-- uncomment to enable plugin in all products
104-
<depends>com.intellij.modules.lang</depends>
105-
-->
106-
<depends>com.jetbrains.php</depends>
107-
<depends>com.intellij.modules.platform</depends>
108-
109-
<extensions defaultExtensionNs="com.intellij">
110-
<!--
111-
<toolWindow id="Magento2 Modules"
112-
icon="/resources/magento2-module.png"
113-
anchor="left"
114-
secondary="false"
115-
factoryClass="com.magento.idea.magento2plugin.php.tool.ModuleToolWindowFactory" />
116-
-->
117-
<projectConfigurable instance="com.magento.idea.magento2plugin.SettingsForm" id="Magento2.SettingsForm" displayName="Magento2 Plugin"/>
118-
<projectService serviceImplementation="com.magento.idea.magento2plugin.Settings"/>
119-
120-
<psi.referenceContributor implementation="com.magento.idea.magento2plugin.xml.di.reference.DiReferenceContributor"/>
121-
<psi.referenceContributor implementation="com.magento.idea.magento2plugin.xml.observer.reference.ObserverReferenceContributor"/>
122-
<psi.referenceContributor implementation="com.magento.idea.magento2plugin.xml.observer.reference.EventReferenceContributor"/>
123-
<psi.referenceContributor implementation="com.magento.idea.magento2plugin.xml.layout.reference.LayoutReferenceContributor"/>
124-
<psi.referenceContributor implementation="com.magento.idea.magento2plugin.xml.webapi.reference.ServiceReferenceContributor"/>
125-
126-
<completion.contributor language="XML" implementationClass="com.magento.idea.magento2plugin.xml.di.completion.DiCompletionContributor" />
127-
<completion.contributor language="XML" implementationClass="com.magento.idea.magento2plugin.xml.webapi.completion.WebApiCompletionContributor" />
128-
<completion.contributor language="XML" implementationClass="com.magento.idea.magento2plugin.xml.observer.completion.EventCompletionContributor" />
129-
<completion.contributor language="XML" implementationClass="com.magento.idea.magento2plugin.xml.layout.completion.LayoutCompletionContributor" />
130-
131-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.di.index.VirtualTypesNamesFileBasedIndex" />
132-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.observer.index.EventObserverFileBasedIndex" />
133-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.observer.index.EventsDeclarationsFileBasedIndex" />
134-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.di.index.PluginToTypeFileBasedIndex" />
135-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.di.index.TypeConfigurationFileBasedIndex" />
136-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.layout.index.BlockFileBasedIndex" />
137-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.layout.index.ContainerFileBasedIndex" />
138-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.layout.index.BlockClassFileBasedIndex" />
139-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.xml.webapi.index.WebApiTypesFileBasedIndex" />
140-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.php.index.ModulePackageFileBasedIndex" />
141-
142-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.PluginLineMarkerProvider"/>
143-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.ClassConfigurationLineMarkerProvider"/>
144-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.WebApiLineMarkerProvider"/>
145-
146-
<localInspection language="PHP" shortName="MagentoApiInspection" displayName="Module API"
147-
groupPath="Magento2"
148-
groupName="Module Integrity"
149-
enabledByDefault="true"
150-
level="WARNING" implementationClass="com.magento.idea.magento2plugin.php.inspections.MagentoApiInspection"/>
151-
<localInspection language="PHP" shortName="ObjectManagerInspection" displayName="ObjectManager usage"
152-
groupPath="Magento2"
153-
groupName="Module Integrity"
154-
enabledByDefault="true"
155-
level="WARNING" implementationClass="com.magento.idea.magento2plugin.php.inspections.ObjectManagerInspection"/>
156-
<!-- Add your extensions here -->
157-
</extensions>
158-
159-
<application-components>
160-
<!-- Add your application components here -->
161-
</application-components>
162-
163-
<project-components>
164-
<!-- Add your project components here -->
165-
</project-components>
166-
167-
<actions>
168-
<!-- Add your actions here -->
169-
</actions>
17018

171-
</idea-plugin>
19+
</change-notes>
20+
21+
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Build+Number+Ranges for description -->
22+
<idea-version since-build="172"/>
23+
24+
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
25+
on how to target different products -->
26+
<!-- uncomment to enable plugin in all products
27+
<depends>com.intellij.modules.lang</depends>
28+
-->
29+
<depends>com.jetbrains.php</depends>
30+
<depends>JavaScript</depends>
31+
<depends>com.intellij.modules.platform</depends>
32+
33+
<extensions defaultExtensionNs="com.intellij">
34+
<projectConfigurable instance="com.magento.idea.magento2plugin.project.SettingsForm"
35+
id="Magento2.SettingsForm"
36+
displayName="Magento"
37+
nonDefaultProject="true"
38+
groupId="language"
39+
parentId="reference.webide.settings.project.settings.php"
40+
/>
41+
<projectService serviceImplementation="com.magento.idea.magento2plugin.project.Settings"/>
42+
43+
<completion.contributor language="XML" implementationClass="com.magento.idea.magento2plugin.completion.xml.XmlCompletionContributor" />
44+
45+
<psi.referenceContributor language="XML" implementation="com.magento.idea.magento2plugin.reference.xml.XmlReferenceContributor"/>
46+
<psi.referenceContributor language="PHP" implementation="com.magento.idea.magento2plugin.reference.php.PhpReferenceContributor"/>
47+
<psi.referenceContributor language="JavaScript" implementation="com.magento.idea.magento2plugin.reference.js.JsReferenceContributor"/>
48+
49+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.EventObserverIndex" />
50+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.EventNameIndex" />
51+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.VirtualTypeIndex" />
52+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.PluginIndex" />
53+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.BlockNameIndex" />
54+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.ContainerNameIndex" />
55+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.WebApiTypeIndex" />
56+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.ModulePackageIndex" />
57+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.ModuleNameIndex" />
58+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.xml.PhpClassNameIndex" />
59+
60+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.PluginLineMarkerProvider"/>
61+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.ClassConfigurationLineMarkerProvider"/>
62+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.WebApiLineMarkerProvider"/>
63+
64+
<directoryProjectConfigurator implementation="com.magento.idea.magento2plugin.project.ProjectDetector"/>
65+
</extensions>
66+
67+
<application-components>
68+
<!-- Add your application components here -->
69+
</application-components>
70+
71+
<project-components>
72+
<!-- Add your project components here -->
73+
</project-components>
74+
75+
<actions>
76+
<!-- Add your actions here -->
77+
</actions>
78+
79+
</idea-plugin>

0 commit comments

Comments
 (0)