File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/fr/adrienbrault/idea/symfony2plugin Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -265,13 +265,21 @@ public static ElementPattern<PsiElement> getPrintBlockFunctionPattern() {
265
265
return PlatformPatterns .psiElement ().withParent (PlatformPatterns .psiElement (TwigElementTypes .PRINT_BLOCK )).withLanguage (TwigLanguage .INSTANCE );
266
266
}
267
267
268
+ /**
269
+ * {{ form(foo) }}, {{ foo }}
270
+ * NOT: {{ foo.bar }}
271
+ */
268
272
public static ElementPattern <PsiElement > getCompletablePattern () {
269
273
return PlatformPatterns .psiElement ()
270
- .afterLeaf (
274
+ .andNot (
275
+ PlatformPatterns .psiElement ().afterLeaf (PlatformPatterns .psiElement (TwigTokenTypes .DOT ))
276
+ )
277
+ .afterLeafSkipping (
271
278
PlatformPatterns .or (
272
279
PlatformPatterns .psiElement (TwigTokenTypes .LBRACE ),
273
280
PlatformPatterns .psiElement (PsiWhiteSpace .class )
274
- )
281
+ ),
282
+ PlatformPatterns .psiElement ()
275
283
)
276
284
.withParent (PlatformPatterns .psiElement (TwigElementTypes .PRINT_BLOCK ))
277
285
.withLanguage (TwigLanguage .INSTANCE );
You can’t perform that action at this time.
0 commit comments