Skip to content

Commit fc107e1

Browse files
committed
fix service completion in single quote yaml string pattern to reflect lexer changes; so support drupal code convention again
1 parent 5cb500f commit fc107e1

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/fr/adrienbrault/idea/symfony2plugin/config/yaml/YamlElementPatternHelper.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,19 @@ public static ElementPattern<PsiElement> getServiceDefinition() {
492492
)
493493
.withLanguage(YAMLLanguage.INSTANCE)
494494
,
495+
// @TODO: cleanup on PhpStorm8 support only
496+
PlatformPatterns
497+
.psiElement(YAMLTokenTypes.SCALAR_STRING)
498+
.withText(
499+
StandardPatterns.string().startsWith("'@")
500+
)
501+
.withLanguage(YAMLLanguage.INSTANCE),
502+
PlatformPatterns
503+
.psiElement(YAMLTokenTypes.SCALAR_STRING)
504+
.withText(
505+
StandardPatterns.string().startsWith("\"@")
506+
)
507+
.withLanguage(YAMLLanguage.INSTANCE),
495508
PlatformPatterns
496509
.psiElement(YAMLTokenTypes.SCALAR_DSTRING)
497510
.withText(
@@ -519,6 +532,19 @@ public static ElementPattern<PsiElement> getServiceParameterDefinition() {
519532
)
520533
.withLanguage(YAMLLanguage.INSTANCE)
521534
,
535+
// @TODO: cleanup on PhpStorm8 support only
536+
PlatformPatterns
537+
.psiElement(YAMLTokenTypes.SCALAR_STRING)
538+
.withText(
539+
StandardPatterns.string().startsWith("'%")
540+
)
541+
.withLanguage(YAMLLanguage.INSTANCE),
542+
PlatformPatterns
543+
.psiElement(YAMLTokenTypes.SCALAR_STRING)
544+
.withText(
545+
StandardPatterns.string().startsWith("\"%")
546+
)
547+
.withLanguage(YAMLLanguage.INSTANCE),
522548
PlatformPatterns
523549
.psiElement(YAMLTokenTypes.SCALAR_DSTRING)
524550
.withText(

0 commit comments

Comments
 (0)