Open miranska opened 5 years ago
Thank you. I know Java parser is broken. I need a perfect one in my daily job. I will work on after merging TypeScript parser.
Which forum? Unlike Python parser, the Java parser cannot record annotations.
Thank you @masatake, will be waiting! As for the forums, I mean old posts, like these two (where specific patterns / RegEx were used):
219
What I wrote in #219 is still true. Even with the current Java parser implementation, we may be able to gather annotation information if we add code to parseJavaAnnotation.
e.g.
cachesEndpoint a.java /^ public CachesEndpoint cachesEndpoint(Map<String, CacheManager> cacheManagers) {$/;" m annotations:@Bean,@ConditionalOnMissingBean class:CachesEndpointAutoConfiguration
Above output is enough for you? I cannot promise that I add the code gathering annotations and attaching them to a tag as "annotations:" field. But I would like to know what you want to do with such information. I want to reflect your idea to new Java parser (and partially current Java parser if possible.).
I'm very interested in making ctags support frameworks and DSL. See https://github.com/universal-ctags/ctags/issues/2067. The issue is about Perl. However, we can apply the concept of subparser to Java and JavaEE (or Spring).
Nice! We are doing some code analysis/parsing for research purposes, so the annotations info may be helpful. However, it is not a showstopper for our needs.
Looking at the forums, it seems that ctags is capable of detecting some annotations. However, for example, in this file it cannot detect any. I provide the details in the template below.
Could you please tell me, is it a bug or a feature and if you have any "best practices" advice on detecting such annotations?
The name of the parser: Java
The command line you used to run ctags:
The content of input file:
The tags output you are not satisfied with:
The tags output you expect: something similar to annotation for 1-line objects(e.g., global variables)
The version of ctags:
How do you get ctags binary: https://github.com/universal-ctags/ctags-docker