@Override public void indexObject(PsiJetObjectStub stub, IndexSink sink) { String name = stub.getName(); assert name != null; sink.occurrence(JetShortClassNameIndex.getInstance().getKey(), name); if (stub.isTopLevel()) { sink.occurrence(JetTopLevelShortObjectNameIndex.getInstance().getKey(), name); } FqName fqName = stub.getFQName(); if (fqName != null) { sink.occurrence(JetFullClassNameIndex.getInstance().getKey(), fqName.getFqName()); } recordClassOrObjectByPackage(stub, sink); }
@Override public void indexClass(PsiJetClassStub stub, IndexSink sink) { String name = stub.getName(); if (name != null) { sink.occurrence(JetShortClassNameIndex.getInstance().getKey(), name); } String fqn = stub.getQualifiedName(); if (fqn != null) { sink.occurrence(JetFullClassNameIndex.getInstance().getKey(), fqn); } for (String superName : stub.getSuperNames()) { sink.occurrence(JetSuperClassIndex.getInstance().getKey(), superName); } recordClassOrObjectByPackage(stub, sink); }