Search in sources :

Example 1 with ConstantProcessor

use of com.perl5.lang.perl.extensions.packageprocessor.impl.ConstantProcessor 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)

Aggregations

TemplateDataLanguageMappings (com.intellij.psi.templateLanguages.TemplateDataLanguageMappings)1 TemplateDataLanguagePatterns (com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns)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