Skip to content

Commit e314f10

Browse files
author
Vitaliy
authored
Merge branch '2.0.0-develop' into fixed-usage-of-JavaScriptFileType
2 parents 7a30df7 + b184c8b commit e314f10

File tree

14 files changed

+233
-5
lines changed

14 files changed

+233
-5
lines changed

src/com/magento/idea/magento2plugin/completion/xml/XmlCompletionContributor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public XmlCompletionContributor() {
193193
extend(CompletionType.BASIC, psiElement(XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN)
194194
.inside(XmlPatterns.xmlAttribute().withName("method")
195195
.withParent(XmlPatterns.xmlTag().withName("job"))
196-
).inFile(xmlFile().withName(string().endsWith("crontab.xml"))),
196+
).inFile(xmlFile().withName(string().matches("crontab.xml"))),
197197
new PhpJobMethodCompletionContributor()
198198
);
199199

src/com/magento/idea/magento2plugin/reference/provider/PhpJobMethodReferenceProvider.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
@@ -15,7 +15,6 @@
1515
import com.jetbrains.php.lang.psi.elements.PhpClass;
1616
import com.magento.idea.magento2plugin.indexes.DiIndex;
1717
import com.magento.idea.magento2plugin.reference.xml.PolyVariantReferenceBase;
18-
// CHECKSTYLE IGNORE check FOR NEXT 1 LINES
1918
import java.util.ArrayList;
2019
import java.util.Collection;
2120
import java.util.List;
@@ -41,7 +40,7 @@ public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNu
4140
PhpClass phpClass = DiIndex.getPhpClassOfJobMethod((XmlElement) element);
4241
if (phpClass != null) {
4342
Collection<Method> methods = phpClass.getMethods();
44-
methods.removeIf(m -> !m.getName().equalsIgnoreCase(methodName));
43+
methods.removeIf(method -> !method.getName().contains(methodName));
4544
psiReferences.add(new PolyVariantReferenceBase(element, methods));
4645
}
4746

src/com/magento/idea/magento2plugin/reference/xml/XmlReferenceContributor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void registerReferenceProviders(@NotNull PsiReferenceRegistrar registrar)
9393
XmlPatterns.xmlAttribute().withName("method").withParent(
9494
XmlPatterns.xmlTag().withName("job")
9595
)
96-
).inFile(xmlFile().withName(string().endsWith("crontab.xml"))),
96+
).inFile(xmlFile().withName(string().matches("crontab.xml"))),
9797
new PhpJobMethodReferenceProvider()
9898
);
9999

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
10+
<group id="default">
11+
<job name="test_catalog_index_refresh_price" instance="RefreshSpe<caret>" method="">
12+
<schedule>0 * * * *</schedule>
13+
</job>
14+
</group>
15+
</config>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
10+
<group id="default">
11+
<job name="test_catalog_index_refresh_price" instance="Magento\Catalog\Cron\RefreshSpecialPrices" method="exe<caret>">
12+
<schedule>0 * * * *</schedule>
13+
</job>
14+
</group>
15+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
10+
<group id="default">
11+
<job name="" instance="Magento\Catalog\Cron\RefreshSpecialPrices" method="ex<caret>">
12+
<schedule>0 * * * *</schedule>
13+
</job>
14+
</group>
15+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
10+
<group id="default">
11+
<job name="test_catalog_index_refresh_price" instance="RefreshSpe<caret>" method="">
12+
<schedule>0 * * * *</schedule>
13+
</job>
14+
</group>
15+
</config>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
10+
<group id="default">
11+
<job name="test_catalog_index_refresh_price" wrong_attr="RefreshSpe<caret>" method="">
12+
<schedule>0 * * * *</schedule>
13+
</job>
14+
</group>
15+
</config>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
10+
<group id="default">
11+
<jobless name="test_catalog_index_refresh_price" instance="RefreshSpe<caret>" method="">
12+
<schedule>0 * * * *</schedule>
13+
</jobless>
14+
</group>
15+
</config>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Catalog\Cron;
8+
9+
class RefreshSpecialPrices
10+
{
11+
public function execute()
12+
{
13+
}
14+
15+
public function executeFull()
16+
{
17+
}
18+
}

0 commit comments

Comments
 (0)