}
}
);
extend(CompletionType.BASIC, TwigHelper.getPrintBlockFunctionPattern("controller"), new ControllerCompletionProvider());
// assets completion:
// stylesheets and javascripts tags
extend(CompletionType.BASIC, TwigHelper.getAutocompletableAssetPattern(), new AssetCompletionProvider().setAssetParser(
new AssetDirectoryReader()
));
extend(CompletionType.BASIC, TwigHelper.getAutocompletableAssetTag("stylesheets"), new AssetCompletionProvider().setAssetParser(
new AssetDirectoryReader().setFilterExtension(TwigHelper.CSS_FILES_EXTENSIONS).setIncludeBundleDir(true)
));
extend(CompletionType.BASIC, TwigHelper.getAutocompletableAssetTag("javascripts"), new AssetCompletionProvider().setAssetParser(
new AssetDirectoryReader().setFilterExtension(TwigHelper.JS_FILES_EXTENSIONS).setIncludeBundleDir(true)
));
// routing completion like path() function
extend(
CompletionType.BASIC,
TwigHelper.getAutocompletableRoutePattern(),
new CompletionProvider<CompletionParameters>() {
public void addCompletions(@NotNull CompletionParameters parameters,
ProcessingContext context,
@NotNull CompletionResultSet resultSet) {
if(!Symfony2ProjectComponent.isEnabled(parameters.getPosition())) {
return;
}
resultSet.addAllElements(RouteHelper.getRoutesLookupElements(parameters.getPosition().getProject()));
}
}
);
// routing parameter completion
extend(
CompletionType.BASIC,
TwigHelper.getPathAfterLeafPattern(),
new PathParameterCompletionProvider()
);
// simulated php completion var.<foo>
extend(
CompletionType.BASIC,
TwigHelper.getTypeCompletionPattern(),
new TypeCompletionProvider()
);
// {# variable \Foo\ClassName #}
extend(
CompletionType.BASIC,
TwigHelper.getTwigTypeDocBlock(),
new TwigDocBlockTypeClassCompletionProvider()
);
// {# @Container Foo:Bar #}
extend(
CompletionType.BASIC,
TwigHelper.getTwigDocBlockMatchPattern(ControllerDocVariableCollector.DOC_PATTERN_COMPLETION),
new ControllerCompletionProvider()
);
// {% form_theme * %}
extend(
CompletionType.BASIC,