Search in sources :

Example 1 with TemplateDataLanguagePatterns

use of com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns in project intellij-plugins by JetBrains.

the class HbParserTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    final MutablePicoContainer appContainer = getApplication().getPicoContainer();
    appContainer.registerComponentInstance(PropertiesComponent.class.getName(), PropertiesComponentImpl.create());
    appContainer.registerComponentInstance(TemplateDataLanguageMappings.class.getName(), new TemplateDataLanguageMappings(getProject()));
    appContainer.registerComponentInstance(TemplateDataLanguagePatterns.class.getName(), new TemplateDataLanguagePatterns());
    addExplicitExtension(LanguageParserDefinitions.INSTANCE, HbLanguage.INSTANCE, new HbParseDefinition());
}
Also used : MutablePicoContainer(org.picocontainer.MutablePicoContainer) TemplateDataLanguagePatterns(com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns) PropertiesComponent(com.intellij.ide.util.PropertiesComponent) TemplateDataLanguageMappings(com.intellij.psi.templateLanguages.TemplateDataLanguageMappings)

Example 2 with TemplateDataLanguagePatterns

use of com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns in project Perl5-IDEA by Camelcade.

the class PerlParserTestBase method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    registerApplicationService(TemplateDataLanguageMappings.class, new TemplateDataLanguageMappings(getProject()));
    registerApplicationService(TemplateDataLanguagePatterns.class, new TemplateDataLanguagePatterns());
    addExplicitExtension(LanguageParserDefinitions.INSTANCE, PerlLanguage.INSTANCE, new PerlParserDefinition());
    addExplicitExtension(LanguageParserDefinitions.INSTANCE, PodLanguage.INSTANCE, new PodParserDefinition());
    registerComponentInstance(myProject, PerlNamesCache.class, new PerlNamesCache(myProject));
    registerExtensionPoint(PerlParserExtension.EP_NAME, PerlParserExtension.class);
    registerExtension(PerlParserExtension.EP_NAME, new MooseParserExtension());
    registerExtension(PerlParserExtension.EP_NAME, new PerlSwitchParserExtensionImpl());
    registerExtension(PerlParserExtension.EP_NAME, new ClassAccessorParserExtension());
    registerExtension(PerlParserExtension.EP_NAME, new MojoParserExtension());
    PerlParserExtensions parserExtensions = new PerlParserExtensions();
    registerComponentInstance(ApplicationManager.getApplication(), PerlParserExtensions.class, parserExtensions);
    parserExtensions.initComponent();
    PerlPackageProcessorEP.EP.addExplicitExtension("constant", new ConstantProcessor());
    PerlPackageProcessorEP.EP.addExplicitExtension("vars", new VarsProcessor());
    PerlPackageProcessorEP.EP.addExplicitExtension("Exception::Class", new ExceptionClassProcessor());
    myProject.registerService(PerlSharedSettings.class, new PerlSharedSettings(getProject()));
}
Also used : TemplateDataLanguagePatterns(com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns) PerlSwitchParserExtensionImpl(com.perl5.lang.perl.parser.PerlSwitchParserExtensionImpl) ClassAccessorParserExtension(com.perl5.lang.perl.parser.ClassAccessorParserExtension) ConstantProcessor(com.perl5.lang.perl.extensions.packageprocessor.impl.ConstantProcessor) MooseParserExtension(com.perl5.lang.perl.parser.MooseParserExtension) PerlParserExtensions(com.perl5.lang.perl.idea.application.PerlParserExtensions) PerlSharedSettings(com.perl5.lang.perl.idea.configuration.settings.PerlSharedSettings) PerlParserDefinition(com.perl5.lang.perl.PerlParserDefinition) PodParserDefinition(com.perl5.lang.pod.PodParserDefinition) MojoParserExtension(com.perl5.lang.perl.parser.MojoParserExtension) TemplateDataLanguageMappings(com.intellij.psi.templateLanguages.TemplateDataLanguageMappings) VarsProcessor(com.perl5.lang.perl.extensions.packageprocessor.impl.VarsProcessor) ExceptionClassProcessor(com.perl5.lang.perl.extensions.packageprocessor.impl.ExceptionClassProcessor) PerlNamesCache(com.perl5.lang.perl.idea.project.PerlNamesCache)

Example 3 with TemplateDataLanguagePatterns

use of com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns in project idea-handlebars by dmarcotte.

the class HbParserTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    final MutablePicoContainer appContainer = getApplication().getPicoContainer();
    appContainer.registerComponentInstance(PropertiesComponent.class.getName(), new PropertiesComponentStub());
    appContainer.registerComponentInstance(TemplateDataLanguageMappings.class.getName(), new TemplateDataLanguageMappings(getProject()));
    appContainer.registerComponentInstance(TemplateDataLanguagePatterns.class.getName(), new TemplateDataLanguagePatterns());
    addExplicitExtension(LanguageParserDefinitions.INSTANCE, HbLanguage.INSTANCE, new HbParseDefinition());
}
Also used : MutablePicoContainer(org.picocontainer.MutablePicoContainer) TemplateDataLanguagePatterns(com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns) PropertiesComponentStub(com.dmarcotte.handlebars.config.PropertiesComponentStub) PropertiesComponent(com.intellij.ide.util.PropertiesComponent) TemplateDataLanguageMappings(com.intellij.psi.templateLanguages.TemplateDataLanguageMappings)

Aggregations

TemplateDataLanguageMappings (com.intellij.psi.templateLanguages.TemplateDataLanguageMappings)3 TemplateDataLanguagePatterns (com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns)3 PropertiesComponent (com.intellij.ide.util.PropertiesComponent)2 MutablePicoContainer (org.picocontainer.MutablePicoContainer)2 PropertiesComponentStub (com.dmarcotte.handlebars.config.PropertiesComponentStub)1 PerlParserDefinition (com.perl5.lang.perl.PerlParserDefinition)1 ConstantProcessor (com.perl5.lang.perl.extensions.packageprocessor.impl.ConstantProcessor)1 ExceptionClassProcessor (com.perl5.lang.perl.extensions.packageprocessor.impl.ExceptionClassProcessor)1 VarsProcessor (com.perl5.lang.perl.extensions.packageprocessor.impl.VarsProcessor)1 PerlParserExtensions (com.perl5.lang.perl.idea.application.PerlParserExtensions)1 PerlSharedSettings (com.perl5.lang.perl.idea.configuration.settings.PerlSharedSettings)1 PerlNamesCache (com.perl5.lang.perl.idea.project.PerlNamesCache)1 ClassAccessorParserExtension (com.perl5.lang.perl.parser.ClassAccessorParserExtension)1 MojoParserExtension (com.perl5.lang.perl.parser.MojoParserExtension)1 MooseParserExtension (com.perl5.lang.perl.parser.MooseParserExtension)1 PerlSwitchParserExtensionImpl (com.perl5.lang.perl.parser.PerlSwitchParserExtensionImpl)1 PodParserDefinition (com.perl5.lang.pod.PodParserDefinition)1