Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313948 - Package declarations unsupported?
Summary: Package declarations unsupported?
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: APT (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Generic inbox for the JDT-APT component CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-21 13:31 EDT by Greg Gibeling CLA
Modified: 2020-02-06 15:10 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Gibeling CLA 2010-05-21 13:31:34 EDT
Shown below is a partial stack trace (I removed the trace through my code since that's not useful).  It would appear that org.eclipse.jdt.apt.core.internal.util.Factory.createDeclaration() is missing a case for packages, as shown in http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/util/Factory.java?view=markup.  This makes it difficult/impossible to process annotations in package-info.java files.

Actually while we're at it the "IllegalStateException" is pretty useless, it could at least say "binding type \"package\" is not (yet) supported" or something of the like.  Basically just emphasize that the binding type not be recognized is the problem.


java.lang.IllegalStateException: failed to create declaration from package foo.bar
	at org.eclipse.jdt.apt.core.internal.util.Factory.createDeclaration(Factory.java:112)
	at org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv.getDeclarations(BaseProcessorEnv.java:374)
	at org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv.getDeclarationsAnnotatedWith(BaseProcessorEnv.java:305)
	at org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv.getDeclarationsAnnotatedWith(BaseProcessorEnv.java:279)
Comment 1 Eclipse Genie CLA 2020-02-06 15:10:03 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.