Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Provide an index with annotated elements stubs #53

Closed
lisachenko opened this issue Apr 5, 2016 · 5 comments
Closed

[API] Provide an index with annotated elements stubs #53

lisachenko opened this issue Apr 5, 2016 · 5 comments
Labels

Comments

@lisachenko
Copy link

It would be nice to provide an API for querying the collections of PhpNamedElements by annotation name. This can be useful in many places and plugins to quickly get interesting elements, for example, to find all methods, annotated with \Sensio\Bundle\FrameworkExtraBundle\Configuration\Route, etc

Stub index should be something like this: <String, PhpNamedElement[]>

@lisachenko
Copy link
Author

Implemented this for my plugin like following: https://github.com/goaop/idea-plugin/blob/d92d57e0fe39100755f3e79ff6fa8315862bd023/src/com/aopphp/go/index/AnnotatedPhpNamedElementIndex.java

Speed of adding a back references with this index, eg. from annotation name to all usages is pretty nice, whereas without this index full scan for PhpIndex will be performed.

@Haehnchen
Copy link
Owner

also Drupal needs this Haehnchen/idea-php-drupal-symfony2-bridge#11

@Haehnchen
Copy link
Owner

to be implemented with #79

Haehnchen added a commit that referenced this issue Jan 12, 2017
Haehnchen added a commit that referenced this issue Sep 15, 2017
Haehnchen added a commit that referenced this issue Sep 15, 2017
Haehnchen added a commit that referenced this issue Sep 15, 2017
Haehnchen added a commit that referenced this issue Sep 15, 2017
Haehnchen added a commit that referenced this issue Sep 15, 2017
Haehnchen added a commit that referenced this issue Sep 15, 2017
Haehnchen added a commit that referenced this issue Sep 15, 2017
Provide Annotation class usage linemarker #79, [API] Provide an index with annotated elements stubs #53
@Haehnchen Haehnchen added fixed and removed todo labels Sep 15, 2017
@Haehnchen
Copy link
Owner

AnnotationUtil.getImplementationsForAnnotation will help. targeting PhpDocTag

@lisachenko
Copy link
Author

Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants