Summary: | annotation classes not found | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jeff McAffer <jeffmcaffer> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | Olivier_Thomann |
Version: | 3.6 | Keywords: | needinfo |
Target Milestone: | 3.7 M7 | ||
Hardware: | PC | ||
OS: | Mac OS X - Carbon (unsup.) | ||
Whiteboard: |
Description
Jeff McAffer
2010-08-05 09:29:36 EDT
A test case would be welcome. Sorry, the code is all proprietary (I don't even have access). Basically take any class that defines an annotation and put it in a folder rather than at the root of the project. Then try to reference the annotation. (In reply to comment #2) > Sorry, the code is all proprietary (I don't even have access). Basically take > any class that defines an annotation and put it in a folder rather than at the > root of the project. Then try to reference the annotation. Are you using APT ? Are you simply referencing the annotation inside another class like this? package p; import p1.Annot; @Annot(1) public class X { } where Annot is defined as: package p1; public @interface Annot { int value() default 0; } This works fine. So it must be something else ? Are you using annotation processors ? If yes, how did you define them ? Clearly we have a lack of details here that prevents us from investigating this issue. clearly. Let me see if I can get more detail. Any update on this ? unfortunately not yet but I hope to get back to it in the next week or two. Sorry for the delay. Any update on this ? should have more info next week. sorry or the delay. This bug is about to be closed as WORKSFORME. Dunno what to say here. I can reproduce the problem but only with proprietary annotations and code etc. I tried to distill this out into a standalone test case but no luck. We are using processors but I really don't know how/when these are hooked in. I think think the problem is more the annotation themselves not being found. For example, I have a bundle "annot" that has the annotations and its processor. There is something whacky about how the annotation lookup is happening. If the bundle is in the workspace as a project and has the annotation in a jar in the bundle then it works, if the annotation types are exploded in the root of the project, then it does not. By "works" here I mean that types in some other bundle "test" can reference the annotations correctly. Here I don't think the annotation processors are being used at all. So, not sure what to do here. if you want to close this bug, I can reopen when I can supply a real test case. Thanks for your patience. Closing as WORKSFORME. Verified. Please reopen if you can provide a test case with which we can work. |