Community
Participate
Working Groups
HEAD ASTParser#createAST(..) currently throws this exception when called after setSource(IClassFile) for a class file without source attachment. java.lang.IllegalStateException at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:783) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:616) createAST(..) specifies that it can throw an ISE at any time, but since this case is fully predictable, I think at least the javadoc of setSource(IClassFile) should warn that the parser will fail if source is not available. And while you're at the javadocs, there are also 2 glitches in the class doc: - "// handles JDK 1.0, 1.1, 1.2, 1.3, 1.4, 1.5" should include 1.6 - "settings are automicatically returned to their defaults" should be "settings are automatically reset to their defaults"
Fixed and released in HEAD. To verify, please check the doc.
Verified for 3.2 M6 using build I20060328-0010