Skip to content

Commit 732680a

Browse files
author
Vitaliy Boyko
committed
Merge branch '3.1.0-develop' of github.com:magento/magento2-phpstorm-plugin into 3.0.2->3.1.0-forwardport
� Conflicts: � .github/workflows/gradle.yml � CHANGELOG.md � build.gradle � resources/META-INF/plugin.xml
2 parents 7eb8415 + 2aa1baf commit 732680a

File tree

46 files changed

+1799
-3
lines changed

Some content is hidden

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

46 files changed

+1799
-3
lines changed

.github/workflows/gradle.yml

+1-1
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, 3.0.2-develop ]
8+
branches: [ master, 3.1.0-develop ]
99

1010
jobs:
1111
build-linux:

CHANGELOG.md

+2
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.1.0
8+
79
## 3.0.2
810

911
### Fixed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repositories {
1515
}
1616

1717
group 'com.magento.idea'
18-
version '3.0.2'
18+
version '3.1.0'
1919

2020
apply plugin: 'org.jetbrains.intellij'
2121
apply plugin: 'java'

resources/META-INF/plugin.xml

+2-1
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>3.0.2</version>
10+
<version>3.1.0</version>
1111
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>
1212

1313
<description><![CDATA[
@@ -69,6 +69,7 @@
6969
<action id="MagentoCreateUiComponentForm" class="com.magento.idea.magento2plugin.actions.generation.NewUiComponentFormAction" />
7070
<action id="NewModelsAction" class="com.magento.idea.magento2plugin.actions.generation.NewModelsAction" />
7171
<action id="MagentoCreateADataModel" class="com.magento.idea.magento2plugin.actions.generation.NewDataModelAction" />
72+
<action id="MagentoMessageQueue" class="com.magento.idea.magento2plugin.actions.generation.NewMessageQueueAction" />
7273
<add-to-group group-id="NewGroup" anchor="last"/>
7374
</group>
7475

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
4+
</config>

resources/fileTemplates/internal/Magento Queue Communication XML.xml.html

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
4+
</config>

resources/fileTemplates/internal/Magento Queue Consumer XML.xml.html

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
4+
</config>

resources/fileTemplates/internal/Magento Queue Publisher XML.xml.html

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
4+
</config>

resources/fileTemplates/internal/Magento Queue Topology XML.xml.html

Whitespace-only changes.

resources/magento2/validation.properties

+3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ validator.box.notEmpty=The {0} field must contain a valid selection from the dro
33
validator.package.validPath=Please specify a valid Magento 2 installation path
44
validator.alphaNumericCharacters=The {0} field must contain letters and numbers only
55
validator.alphaNumericAndUnderscoreCharacters={0} must contain letters, numbers and underscores only
6+
validator.alphaAndPeriodCharacters=The {0} field must contain alphabets and periods only
7+
validator.alphaAndDashCharacters=The {0} field must contain alphabets and dashes only
68
validator.alreadyDeclared={0} is already declared in the {1} module
79
validator.startWithNumberOrCapitalLetter=The {0} field must start with a number or a capital letter
810
validator.onlyNumbers=The {0} field must contain numbers only
911
validator.mustNotBeNegative={0} must not be negative
1012
validator.identifier=The {0} field must contain letters, numbers, dashes, and underscores only
1113
validator.class.isNotValid=The {0} field does not contain a valid class name
14+
validator.fqn.isNotValid=The {0} field does not contain a valid fully qualified class name
1215
validator.class.shouldBeUnique=Duplicated class {0}
1316
validator.namespace.isNotValid=The {0} field does not contain a valid namespace
1417
validator.directory.isNotValid=The {0} field does not contain a valid directory
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.actions.generation;
7+
8+
import com.intellij.ide.IdeView;
9+
import com.intellij.openapi.actionSystem.AnAction;
10+
import com.intellij.openapi.actionSystem.AnActionEvent;
11+
import com.intellij.openapi.actionSystem.CommonDataKeys;
12+
import com.intellij.openapi.actionSystem.DataContext;
13+
import com.intellij.openapi.actionSystem.LangDataKeys;
14+
import com.intellij.openapi.project.Project;
15+
import com.intellij.psi.PsiDirectory;
16+
import com.magento.idea.magento2plugin.MagentoIcons;
17+
import com.magento.idea.magento2plugin.actions.generation.dialog.NewMessageQueueDialog;
18+
import org.jetbrains.annotations.NotNull;
19+
20+
public class NewMessageQueueAction extends AnAction {
21+
public static final String ACTION_NAME = "Magento 2 Message Queue";
22+
public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Message Queue";
23+
24+
/**
25+
* Constructor.
26+
*/
27+
public NewMessageQueueAction() {
28+
super(ACTION_NAME, ACTION_DESCRIPTION, MagentoIcons.MODULE);
29+
}
30+
31+
@Override
32+
public void actionPerformed(@NotNull final AnActionEvent event) {
33+
final DataContext dataContext = event.getDataContext();
34+
35+
final IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);
36+
if (view == null) {
37+
return;
38+
}
39+
40+
final Project project = CommonDataKeys.PROJECT.getData(dataContext);
41+
if (project == null) {
42+
return;
43+
}
44+
45+
final PsiDirectory directory = view.getOrChooseDirectory();
46+
if (directory == null) {
47+
return;
48+
}
49+
50+
NewMessageQueueDialog.open(project, directory);
51+
}
52+
53+
@Override
54+
public boolean isDumbAware() {
55+
return false;
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.actions.generation.data;
7+
8+
public class QueueCommunicationData {
9+
private final String topicName;
10+
private final String handlerName;
11+
private final String handlerType;
12+
private final String handlerMethod;
13+
private final String moduleName;
14+
15+
/**
16+
* Constructor.
17+
*/
18+
public QueueCommunicationData(
19+
final String topicName,
20+
final String handlerName,
21+
final String handlerType,
22+
final String handlerMethod,
23+
final String moduleName
24+
) {
25+
this.topicName = topicName;
26+
this.handlerName = handlerName;
27+
this.handlerType = handlerType;
28+
this.handlerMethod = handlerMethod;
29+
this.moduleName = moduleName;
30+
}
31+
32+
public String getTopicName() {
33+
return topicName;
34+
}
35+
36+
public String getHandlerName() {
37+
return handlerName;
38+
}
39+
40+
public String getHandlerType() {
41+
return handlerType;
42+
}
43+
44+
public String getHandlerMethod() {
45+
return handlerMethod;
46+
}
47+
48+
public String getModuleName() {
49+
return moduleName;
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.actions.generation.data;
7+
8+
public class QueueConsumerData {
9+
private final String consumerName;
10+
private final String queueName;
11+
private final String consumerType;
12+
private final String maxMessages;
13+
private final String connectionName;
14+
private final String moduleName;
15+
16+
/**
17+
* Constructor.
18+
*/
19+
public QueueConsumerData(
20+
final String consumerName,
21+
final String queueName,
22+
final String consumerType,
23+
final String maxMessages,
24+
final String connectionName,
25+
final String moduleName
26+
) {
27+
this.consumerName = consumerName;
28+
this.queueName = queueName;
29+
this.consumerType = consumerType;
30+
this.maxMessages = maxMessages;
31+
this.connectionName = connectionName;
32+
this.moduleName = moduleName;
33+
}
34+
35+
public String getConsumerName() {
36+
return consumerName;
37+
}
38+
39+
public String getQueueName() {
40+
return queueName;
41+
}
42+
43+
public String getConsumerType() {
44+
return consumerType;
45+
}
46+
47+
public String getMaxMessages() {
48+
return maxMessages;
49+
}
50+
51+
public String getConnectionName() {
52+
return connectionName;
53+
}
54+
55+
public String getModuleName() {
56+
return moduleName;
57+
}
58+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.actions.generation.data;
7+
8+
public class QueuePublisherData {
9+
private final String topicName;
10+
private final String connectionName;
11+
private final String exchangeName;
12+
private final String moduleName;
13+
14+
/**
15+
* Constructor.
16+
*/
17+
public QueuePublisherData(
18+
final String topicName,
19+
final String connectionName,
20+
final String exchangeName,
21+
final String moduleName
22+
) {
23+
this.topicName = topicName;
24+
this.connectionName = connectionName;
25+
this.exchangeName = exchangeName;
26+
this.moduleName = moduleName;
27+
}
28+
29+
public String getTopicName() {
30+
return topicName;
31+
}
32+
33+
public String getConnectionName() {
34+
return connectionName;
35+
}
36+
37+
public String getExchangeName() {
38+
return exchangeName;
39+
}
40+
41+
public String getModuleName() {
42+
return moduleName;
43+
}
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.actions.generation.data;
7+
8+
public class QueueTopologyData {
9+
private final String exchangeName;
10+
private final String connectionName;
11+
private final String bindingId;
12+
private final String bindingTopic;
13+
private final String bindingQueue;
14+
private final String moduleName;
15+
16+
/**
17+
* Constructor.
18+
*/
19+
public QueueTopologyData(
20+
final String exchangeName,
21+
final String connectionName,
22+
final String bindingId,
23+
final String bindingTopic,
24+
final String bindingQueue,
25+
final String moduleName
26+
) {
27+
this.exchangeName = exchangeName;
28+
this.connectionName = connectionName;
29+
this.bindingId = bindingId;
30+
this.bindingTopic = bindingTopic;
31+
this.bindingQueue = bindingQueue;
32+
this.moduleName = moduleName;
33+
}
34+
35+
public String getExchangeName() {
36+
return exchangeName;
37+
}
38+
39+
public String getConnectionName() {
40+
return connectionName;
41+
}
42+
43+
public String getBindingId() {
44+
return bindingId;
45+
}
46+
47+
public String getBindingTopic() {
48+
return bindingTopic;
49+
}
50+
51+
public String getBindingQueue() {
52+
return bindingQueue;
53+
}
54+
55+
public String getModuleName() {
56+
return moduleName;
57+
}
58+
}

0 commit comments

Comments
 (0)