Community
Participate
Working Groups
Created attachment 221833 [details] stacktrace I got the attached "IllegalArgumentException: AST must not be null" while modifying a Java file during a full rebuild of my huge workspace (that takes several minutes to compile). Eclipse SDK Version: 3.8.0 Build id: I20120608-1200
Sorry for the delay. The exception at org.eclipse.jdt.core.dom.rewrite.ImportRewrite.create is expected as the AST is null there. It appears SharedASTProvider returns a null AST which is passed around by several parties and rejected with IAE by ImportRewrite.create. Passing to JDT/UI for comment.
We use SharedASTProvider.WAIT_YES but if the workspace is built in parallel, one could possible get 'null' back if the operation got cancelled. Nicolas, is it possible that you maybe cancelled some of the jobs?
I fixed the 'null' case in the AddImportsOperation with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=5f6b0452256e8c5e08facb917eb07d2a65f1ca02
(In reply to comment #2) > Nicolas, is it possible that you maybe cancelled some of the jobs? I don't remember precisely what I did, but that is very possible that I cancelled a build job, since the build takes forever with all the projects in my workspace.
(In reply to comment #4) > (In reply to comment #2) > > Nicolas, is it possible that you maybe cancelled some of the jobs? > > I don't remember precisely what I did, but that is very possible that I > cancelled a build job, since the build takes forever with all the projects > in my workspace. OK, thanks.
Verified in 4.3-I20121030-2000 through code inspection.