in our project we have a custom annotation @DeprecationReason which should be used to document why a member/method/class is deprecated (and thus annotated with @Deprecated)
So to have an IntelliJ warning when @Deprecated is used but @DeprecationReason is missing, I want to check if @Deprecated is present but not @DeprecatedReason.
In general, I find it difficult to find documentation about structural search, but I haven't found anything about analysing "sibling annotations".
Could anyone give me a hint about this?