Search in sources :

Example 1 with KotlinImportDirectiveStub

use of org.jetbrains.kotlin.psi.stubs.KotlinImportDirectiveStub in project kotlin by JetBrains.

the class KtImportDirective method getAliasName.

@Nullable
public String getAliasName() {
    KotlinImportDirectiveStub stub = getStub();
    if (stub != null) {
        return stub.getAliasName();
    }
    ASTNode aliasNameNode = getAliasNameNode();
    if (aliasNameNode == null) {
        return null;
    }
    return aliasNameNode.getText();
}
Also used : KotlinImportDirectiveStub(org.jetbrains.kotlin.psi.stubs.KotlinImportDirectiveStub) ASTNode(com.intellij.lang.ASTNode) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

ASTNode (com.intellij.lang.ASTNode)1 Nullable (org.jetbrains.annotations.Nullable)1 KotlinImportDirectiveStub (org.jetbrains.kotlin.psi.stubs.KotlinImportDirectiveStub)1