Community
Participate
Working Groups
Build id: 200402250800 Sometimes I get a message box with an error about the AST not able to create anew element (see stacktrace from .log at the end). I got it reproducable with the test case below. just try to insert a new method manually befor the last existng method ( public S ^^^^^^^^^) I don't know if the class SolarSystem matters, but it also produces the error when commenting out all the members in this class, so an empty class should do it. package model; public class Universe { SolarSystem[][] fSystems; SolarSystem fEmptySystem = new SolarSystem(); public Universe(int height, int width){ fSystems = new SolarSystem[height][width]; initUnivers(); } private void initUnivers() { for (int i = 0; i < fSystems.length; i++) { for (int j = 0; j < fSystems[0].length; j++) { fSystems[i][j]=fEmptySystem; } } } /* public SolarSystem getSystem(int index){ SolarSystem solarSystem = new SolarSystem(); return null; }*/ public S ^^^^^^^^^ SolarSystem[][] getSystems(){ return fSystems; } } ENTRY org.eclipse.core.runtime 4 2 Mrz 08, 2004 18:57:55.514 !MESSAGE An internal error occurred during: "Java AST creation". !STACK 0 java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:1796) at org.eclipse.jdt.core.dom.ASTConverter.updateInnerPositions(ASTConverter.java:2807) at org.eclipse.jdt.core.dom.ASTConverter.setTypeForField(ASTConverter.java:2791) at org.eclipse.jdt.core.dom.ASTConverter.convertToFieldDeclaration(ASTConverter.java:2725) at org.eclipse.jdt.core.dom.ASTConverter.checkAndAddMultipleFieldDeclaration(ASTConverter.java:359) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:319) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:263) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:142) at org.eclipse.jdt.core.dom.ASTParser.parseCompilationUnit(ASTParser.java:1091) at org.eclipse.jdt.core.dom.ASTParser.temporaryCreateASTDispatch(ASTParser.java:569) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:542) at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:900) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.computeAST(SelectionListenerWithASTManager.java:125) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:144) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$1.run(SelectionListenerWithASTManager.java:99) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:62)
I cannot reproduce using 0304. Could you please try again with that build and tell me if you can get it? Thanks.
Not reproduceable fro me on 0304. Closing. Will reopen if it happens again