Search in sources :

Example 1 with GrReferenceListStub

use of org.jetbrains.plugins.groovy.lang.psi.stubs.GrReferenceListStub in project intellij-community by JetBrains.

the class GrReferenceListImpl method getReferenceElementsGroovy.

@Override
@NotNull
public GrCodeReferenceElement[] getReferenceElementsGroovy() {
    final GrReferenceListStub stub = getStub();
    if (stub != null) {
        final String[] baseClasses = stub.getBaseClasses();
        final GrCodeReferenceElement[] result = new GrCodeReferenceElement[baseClasses.length];
        for (int i = 0; i < baseClasses.length; i++) {
            result[i] = GroovyPsiElementFactory.getInstance(getProject()).createReferenceElementFromText(baseClasses[i], this);
        }
        return result;
    }
    return findChildrenByClass(GrCodeReferenceElement.class);
}
Also used : GrCodeReferenceElement(org.jetbrains.plugins.groovy.lang.psi.api.types.GrCodeReferenceElement) GrReferenceListStub(org.jetbrains.plugins.groovy.lang.psi.stubs.GrReferenceListStub) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

NotNull (org.jetbrains.annotations.NotNull)1 GrCodeReferenceElement (org.jetbrains.plugins.groovy.lang.psi.api.types.GrCodeReferenceElement)1 GrReferenceListStub (org.jetbrains.plugins.groovy.lang.psi.stubs.GrReferenceListStub)1