Search in sources :

Example 1 with KotlinImportDirectiveStubImpl

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

the class KtImportDirectiveElementType method deserialize.

@NotNull
@Override
public KotlinImportDirectiveStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
    boolean isAllUnder = dataStream.readBoolean();
    StringRef importedName = dataStream.readName();
    StringRef aliasName = dataStream.readName();
    boolean isValid = dataStream.readBoolean();
    return new KotlinImportDirectiveStubImpl(parentStub, isAllUnder, importedName, aliasName, isValid);
}
Also used : KotlinImportDirectiveStubImpl(org.jetbrains.kotlin.psi.stubs.impl.KotlinImportDirectiveStubImpl) StringRef(com.intellij.util.io.StringRef) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with KotlinImportDirectiveStubImpl

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

the class KtImportDirectiveElementType method createStub.

@Override
public KotlinImportDirectiveStub createStub(@NotNull KtImportDirective psi, StubElement parentStub) {
    FqName importedFqName = psi.getImportedFqName();
    StringRef fqName = StringRef.fromString(importedFqName == null ? null : importedFqName.asString());
    StringRef aliasName = StringRef.fromString(psi.getAliasName());
    return new KotlinImportDirectiveStubImpl(parentStub, psi.isAllUnder(), fqName, aliasName, psi.isValidImport());
}
Also used : KotlinImportDirectiveStubImpl(org.jetbrains.kotlin.psi.stubs.impl.KotlinImportDirectiveStubImpl) FqName(org.jetbrains.kotlin.name.FqName) StringRef(com.intellij.util.io.StringRef)

Aggregations

StringRef (com.intellij.util.io.StringRef)2 KotlinImportDirectiveStubImpl (org.jetbrains.kotlin.psi.stubs.impl.KotlinImportDirectiveStubImpl)2 NotNull (org.jetbrains.annotations.NotNull)1 FqName (org.jetbrains.kotlin.name.FqName)1