Skip to content

Commit 656f4d5

Browse files
author
Vitaliy Boyko
committed
Merge develop branch
1 parent 0e2bdd1 commit 656f4d5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
import com.intellij.psi.xml.XmlTokenType;
1111
import com.magento.idea.magento2plugin.magento.files.MftfActionGroup;
1212
import com.magento.idea.magento2plugin.magento.files.MftfTest;
13-
import com.magento.idea.magento2plugin.php.util.PhpRegex;
1413
import com.magento.idea.magento2plugin.reference.provider.*;
1514
import com.magento.idea.magento2plugin.reference.provider.mftf.*;
1615
import com.magento.idea.magento2plugin.util.RegExUtil;
17-
import com.magento.idea.magento2plugin.util.Regex;
1816
import org.jetbrains.annotations.NotNull;
1917
import static com.intellij.patterns.XmlPatterns.*;
2018

@@ -163,7 +161,7 @@ public void registerReferenceProviders(@NotNull PsiReferenceRegistrar registrar)
163161
// <someXmlTag userInput="{{someValue}}" />
164162
registrar.registerReferenceProvider(
165163
XmlPatterns.xmlAttributeValue().withValue(
166-
string().matches(Regex.MFTF_CURLY_BRACES)
164+
string().matches(RegExUtil.Magento.MFTF_CURLY_BRACES)
167165
).withParent(XmlPatterns.xmlAttribute().withName(
168166
MftfActionGroup.USER_INPUT_TAG
169167
)),
@@ -175,7 +173,7 @@ public void registerReferenceProviders(@NotNull PsiReferenceRegistrar registrar)
175173
// <someXmlTag url="{{someValue}}" /> in MFTF Tests and ActionGroups
176174
registrar.registerReferenceProvider(
177175
XmlPatterns.xmlAttributeValue().withValue(
178-
string().matches(Regex.MFTF_CURLY_BRACES)
176+
string().matches(RegExUtil.Magento.MFTF_CURLY_BRACES)
179177
).withParent(XmlPatterns.xmlAttribute().withName(
180178
MftfActionGroup.URL_ATTRIBUTE
181179
).withParent(XmlPatterns.xmlTag().withParent(XmlPatterns.xmlTag().withName(
@@ -187,7 +185,7 @@ public void registerReferenceProviders(@NotNull PsiReferenceRegistrar registrar)
187185
);
188186
registrar.registerReferenceProvider(
189187
XmlPatterns.xmlAttributeValue().withValue(
190-
string().matches(Regex.MFTF_CURLY_BRACES)
188+
string().matches(RegExUtil.Magento.MFTF_CURLY_BRACES)
191189
).withParent(XmlPatterns.xmlAttribute().withName(
192190
MftfActionGroup.URL_ATTRIBUTE
193191
).withParent(XmlPatterns.xmlTag().withParent(XmlPatterns.xmlTag().withParent(

src/com/magento/idea/magento2plugin/util/RegExUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public class RegExUtil {
2626
public static class Magento {
2727
public static final String MODULE_NAME
2828
= "[A-Z][a-zA-Z0-9]+_[A-Z][a-zA-Z0-9]+";
29+
30+
public static final String MFTF_CURLY_BRACES
31+
= ".*\\{\\{[^\\}]+\\}\\}.*";
2932
}
3033

3134
public class PhpRegex {

0 commit comments

Comments
 (0)