Community
Participate
Working Groups
If I have the annotation @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) and I change it so the various parts are imported and unqualified: import java.lang.annotation.Target; import static java.lang.annotation.ElementType.TYPE; ... @Target(TYPE) I have problems resolving the enum (i.e. "TYPE"). I get the annotation from the AST, then I can resolve its full name by calling IType.resolveType("Target"). This returns "java.lang.annotation.Target". Unfortunately there is no public way to resolve the enum's full name. The internal method SelectionEngine.select(ICompilationUnit, int, int) can be used to resolve the enum's name, but there should be a nice public method like that available for types.
Do you create the AST with bindings?
Yeah, my mistake. I just need to use the bindings. Sorry.
Verified for 3.4M4