Search in sources :

Example 1 with PsiImportStatementStub

use of com.intellij.psi.impl.java.stubs.PsiImportStatementStub in project intellij-community by JetBrains.

the class PsiImportStatementImpl method getQualifiedName.

@Override
public String getQualifiedName() {
    PsiImportStatementStub stub = getGreenStub();
    if (stub != null) {
        return stub.getImportReferenceText();
    }
    final PsiJavaCodeReferenceElement reference = getImportReference();
    return reference == null ? null : reference.getCanonicalText();
}
Also used : PsiImportStatementStub(com.intellij.psi.impl.java.stubs.PsiImportStatementStub)

Example 2 with PsiImportStatementStub

use of com.intellij.psi.impl.java.stubs.PsiImportStatementStub in project intellij-community by JetBrains.

the class PsiImportStatementBaseImpl method getImportReference.

@Override
public PsiJavaCodeReferenceElement getImportReference() {
    PsiUtilCore.ensureValid(this);
    final PsiImportStatementStub stub = getStub();
    if (stub != null) {
        return stub.getReference();
    }
    return (PsiJavaCodeReferenceElement) calcTreeElement().findChildByRoleAsPsiElement(ChildRole.IMPORT_REFERENCE);
}
Also used : PsiImportStatementStub(com.intellij.psi.impl.java.stubs.PsiImportStatementStub) PsiJavaCodeReferenceElement(com.intellij.psi.PsiJavaCodeReferenceElement)

Aggregations

PsiImportStatementStub (com.intellij.psi.impl.java.stubs.PsiImportStatementStub)2 PsiJavaCodeReferenceElement (com.intellij.psi.PsiJavaCodeReferenceElement)1