use of org.intellij.plugins.intelliLang.inject.java.LanguageReference in project intellij-community by JetBrains.
the class GrLanguageReferenceProvider method registerReferenceProviders.
@Override
public void registerReferenceProviders(@NotNull PsiReferenceRegistrar registrar) {
final Configuration configuration = Configuration.getInstance();
registrar.registerReferenceProvider(GroovyPatterns.groovyLiteralExpression().annotationParam(StandardPatterns.string().with(isLanguageAnnotation(configuration)), "value").and(GroovyPatterns.groovyLiteralExpression().with(isStringLiteral())), new PsiReferenceProvider() {
@NotNull
@Override
public PsiReference[] getReferencesByElement(@NotNull final PsiElement element, @NotNull final ProcessingContext context) {
return new PsiReference[] { new LanguageReference((PsiLiteral) element) };
}
});
}
Aggregations