Stub for annotations: write shortName instead getText

This commit is contained in:
Natalia.Ukhorskaya
2012-10-04 13:57:44 +04:00
parent 8e89cf40b7
commit a5b43cbbae
6 changed files with 45 additions and 15 deletions
@@ -95,6 +95,7 @@ public class KotlinAnnotatedElementsSearcher extends AnnotatedElementsSearcher {
return true;
}
/* Return all elements annotated with given annotation name. Aliases don't work now. */
private static Collection<? extends PsiElement> getJetAnnotationCandidates(final PsiClass annClass, final SearchScope useScope) {
return ApplicationManager.getApplication().runReadAction(new Computable<Collection<? extends PsiElement>>() {
@Override
@@ -91,6 +91,6 @@ public class StubIndexServiceImpl implements StubIndexService {
@Override
public void indexAnnotation(PsiJetAnnotationStub stub, IndexSink sink) {
sink.occurrence(JetIndexKeys.ANNOTATIONS_KEY, stub.getText());
sink.occurrence(JetIndexKeys.ANNOTATIONS_KEY, stub.getShortName());
}
}