| Summary: | Unable to load factory names from container [target\classes] | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Matt Kusnierz <matthew.kusnierz> |
| Component: | APT | Assignee: | Generic inbox for the JDT-APT component <jdt-apt-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse, matthew.kusnierz |
| Version: | 4.3 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Matt Kusnierz
I would strongly recommend *against* trying to put an annotation processor and the code that it is processing in the same workspace. I understand the temptation; but the bottom line here is that an annotation processor is part of the compiler, and in an incremental compilation environment like Eclipse, the compiler is loaded into the JVM all the time. You're asking Eclipse to be able to unload and reload part of itself on demand, and the JVM just can't do that, most of the time. You can get away with this in javac, because in between compilations the process completely shuts down. But that's not true for Eclipse. Best practice when you are developing Eclipse plugins - which includes annotation processors - is to have one Eclipse instance editing the plugin (or processor) code, and have that launch a second Eclipse instance that edits the target (annotated) code. Fair enough, that makes sense I worked once on a project with a bug-tracking system where one possible resolution was "SBT", which stood for "Sad But True". That would be a good resolution in this case. |