use of com.intellij.util.io.StringRef in project kotlin by JetBrains.
the class KtAnnotationEntryElementType method deserialize.
@NotNull
@Override
public KotlinAnnotationEntryStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
StringRef text = dataStream.readName();
boolean hasValueArguments = dataStream.readBoolean();
return new KotlinAnnotationEntryStubImpl(parentStub, text, hasValueArguments);
}
use of com.intellij.util.io.StringRef in project kotlin by JetBrains.
the class IdeStubIndexService method indexFile.
@Override
public void indexFile(KotlinFileStub stub, IndexSink sink) {
FqName packageFqName = stub.getPackageFqName();
sink.occurrence(KotlinExactPackagesIndex.getInstance().getKey(), packageFqName.asString());
if (stub.isScript())
return;
FqName facadeFqName = ((KotlinFileStubForIde) stub).getFacadeFqName();
if (facadeFqName != null) {
sink.occurrence(KotlinFileFacadeFqNameIndex.INSTANCE.getKey(), facadeFqName.asString());
sink.occurrence(KotlinFileFacadeShortNameIndex.INSTANCE.getKey(), facadeFqName.shortName().asString());
sink.occurrence(KotlinFileFacadeClassByPackageIndex.INSTANCE.getKey(), packageFqName.asString());
}
FqName partFqName = ((KotlinFileStubForIde) stub).getPartFqName();
if (partFqName != null) {
sink.occurrence(KotlinFilePartClassIndex.INSTANCE.getKey(), partFqName.asString());
}
List<StringRef> partNames = ((KotlinFileStubForIde) stub).getFacadePartSimpleNames();
if (partNames != null) {
for (StringRef partName : partNames) {
String partSimpleName = StringRef.toString(partName);
if (partSimpleName == null) {
continue;
}
FqName multifileClassPartFqName = packageFqName.child(Name.identifier(partSimpleName));
sink.occurrence(KotlinMultifileClassPartIndex.INSTANCE.getKey(), multifileClassPartFqName.asString());
}
}
}
Aggregations