Skip to content

Commit d551f5e

Browse files
author
Roman Glushko
committed
Merge branch '1.0.1-develop' of https://github.com/magento/magento2-phpstorm-plugin into 184-setup-code-style-checks
2 parents c1240e0 + a6c066f commit d551f5e

File tree

47 files changed

+639
-98
lines changed

Some content is hidden

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

47 files changed

+639
-98
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
<!---
11+
Thank you for contributing to Magento.
12+
To help us process this issue we recommend that you add the following information:
13+
- Summary of the issue,
14+
- Information on your environment,
15+
- Steps to reproduce,
16+
- Expected and actual results,
17+
Fields marked with (*) are required. Please don't remove the template.
18+
-->
19+
20+
**Describe the bug** (*)
21+
22+
A clear and concise description of what the bug is.
23+
24+
**To Reproduce** (*)
25+
26+
Steps to reproduce the behavior:
27+
1. Go to '...'
28+
2. Click on '....'
29+
3. Scroll down to '....'
30+
4. See error
31+
32+
**Expected behavior** (*)
33+
34+
A clear and concise description of what you expected to happen.
35+
36+
**Screenshots**
37+
38+
If applicable, add screenshots to help explain your problem.
39+
40+
**Please complete the following information:** (*)
41+
42+
- OS: [e.g. iOS]
43+
- PhpStorm/Intellij version [e.g. 2019.3.3]
44+
- Version [e.g. 1.0.0]
45+
46+
**Additional context**
47+
48+
Add any other context about the problem here.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!---
11+
Thank you for contributing to Magento.
12+
To help us process this issue we recommend that you add the following information:
13+
- Summary of the issue,
14+
- Expected and actual results,
15+
Fields marked with (*) are required. Please don't remove the template.
16+
-->
17+
18+
**Is your feature request related to a problem? Please describe.**
19+
20+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
21+
22+
**Describe the solution you'd like** (*)
23+
24+
A clear and concise description of what you want to happen.
25+
26+
**Describe alternatives you've considered**
27+
28+
A clear and concise description of any alternative solutions or features you've considered.
29+
30+
**Additional context**
31+
32+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,27 @@
99

1010
<!--- Please provide a general summary of the Pull Request in the Title above -->
1111

12-
### Description (*)
12+
**Description** (*)
1313
<!---
1414
Please provide a description of the changes proposed in the pull request.
1515
Letting us know what has changed and why it needed changing will help us validate this pull request.
1616
-->
1717

18-
### Fixed Issues (if relevant)
18+
**Fixed Issues (if relevant)**
1919
<!---
2020
If relevant, please provide a list of fixed issues in the format magento/magento2-phpstorm-plugin#<issue_number>.
2121
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
2222
-->
2323
1. magento/magento2-phpstorm-plugin#<issue_number>: Issue title
2424

25-
### Questions or comments
25+
**Questions or comments**
2626
<!---
2727
If relevant, here you can ask questions or provide comments on your pull request for the reviewer
2828
For example if you need assistance with writing tests or would like some feedback on one of your development ideas
2929
-->
3030

31-
### Contribution checklist (*)
31+
**Contribution checklist** (*)
3232
- [ ] Pull request has a meaningful description of its purpose
3333
- [ ] All commits are accompanied by meaningful commit messages
34-
34+
- [ ] All new or changed code is covered with integration/functional tests (if applicable)
35+
- [ ] All automated tests passed successfully (all builds are green)

.github/workflows/gradlepublish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ jobs:
2525
run: ./gradlew publishPlugin -i
2626
env:
2727
MAGENTO_PHPSTORM_intellijPublishToken: ${{ secrets.JET_BRAINS_TOKEN }}
28+
MAGENTO_PHPSTORM_isAlpha: false
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will build a package using Gradle and then publish it to JetBrains alpha repository when a PR is merged to the develop branch
2+
3+
name: Publish Plugin alpha version
4+
5+
on:
6+
push:
7+
branches:
8+
- 1.0.1-develop
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
- name: Gradle wrapper
22+
run: gradle wrapper
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Run publish plugin
26+
if: contains(github.event.pull_request.labels.*.name, 'deploy-alpha')
27+
run: ./gradlew publishPlugin -i
28+
env:
29+
MAGENTO_PHPSTORM_intellijPublishToken: ${{ secrets.JET_BRAINS_TOKEN }}
30+
MAGENTO_PHPSTORM_isAlpha: true

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ sourceSets {
5252

5353
publishPlugin {
5454
token = System.getenv("MAGENTO_PHPSTORM_intellijPublishToken")
55+
if (Boolean.valueOf(System.getenv("MAGENTO_PHPSTORM_isAlpha"))) {
56+
channels 'alpha'
57+
version = version + "-alpha-" + getDate()
58+
}
59+
}
60+
61+
static def getDate() {
62+
def date = new Date()
63+
def formattedDate = date.format('yyyy-MM-dd-HH-mm')
64+
return formattedDate
5565
}
5666

5767
apply from: "${project.rootDir}/gradle-tasks/staticChecks.gradle"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 di.xml file configures which dependencies are injected by the object manager. You can also specify sensitive configuration settings using di.xml.
13+
</font><br>
14+
</td>
15+
</tr>
16+
<tr>
17+
<td><font face="verdana" size="-1">
18+
<a href="https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/di-xml-file.html">Read more</a> about di.xml.
19+
</font><br>
20+
</td>
21+
</tr>
22+
</table>
23+
</body>
24+
</html>

resources/magento2/common.properties

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
1+
common.magento.installationPath=Magento Installation Path
12
common.package.name=Package Name
23
common.module.name=Module Name
3-
common.module.version=Module Version
4-
common.module.license=Module's license(s)
5-
common.module.dependencies=Module Dependencies
6-
common.module.description=Module Description
4+
common.module.version=Version
5+
common.module.license=License(s)
6+
common.dependencies=Dependencies
77
common.ok=OK
88
common.cancel=Cancel
99
common.error=Error
1010
common.module.target=Target Module
1111
common.area.target=Target Area
12+
common.name=Name
13+
common.className=Class Name
14+
common.directoryPath=Directory Path
15+
common.methodType=Method Type
16+
common.sortOrder=Sort Order
17+
common.hint.viewModelPreferredVersusBlock=Please consider creating a view model instead of a block if possible for your use case.
18+
common.schedule=Schedule
19+
common.schedule.fixed=Fixed
20+
common.schedule.configurable=Configurable
21+
common.schedule.everyMinute=Every Minute
22+
common.schedule.atMidnight=At midnight
23+
common.schedule.custom=Custom
24+
common.cronGroup=Cron Group
25+
common.directory=Directory
26+
common.notAvailable=N/A
27+
common.classInheritance=Inherit Class
28+
common.license.proprietary=Proprietary
29+
common.description=Description

src/com/magento/idea/magento2plugin/actions/generation/dialog/AbstractDialog.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
* All code generate dialog should extend this class
1212
*/
1313
public abstract class AbstractDialog extends JDialog {
14-
protected void pushToMiddle() {
15-
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
16-
this.setLocation(dim.width / 2 -this.getSize().width / 2, dim.height / 2 - this.getSize().height / 2);
14+
protected void centerDialog(AbstractDialog dialog) {
15+
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
16+
int x = screenSize.width / 2 - dialog.getSize().width / 2;
17+
int y = screenSize.height / 2 - dialog.getSize().height / 2;
18+
dialog.setLocation(x, y);
1719
}
1820

1921
protected void onCancel() {

0 commit comments

Comments
 (0)