Bug 63761 - [1.5] AST Creation error
Summary: [1.5] AST Creation error
Status: RESOLVED DUPLICATE of bug 59052
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-24 17:24 EDT by Olivier Thomann CLA
Modified: 2004-05-26 03:52 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-05-24 17:24:36 EDT
When using syntax 1.5, the ast parser should be called with JLS3.0 level, not
2.0. The conversion of the new for loop is only done in ASTConverter2, which is
activated if the JLS level is 3.0.

Stack trace:
List l = ...
for ( Item i : l)
{
	...
}

An internal error occurred during: "Java AST creation".
java.lang.IllegalArgumentException: Not yet implemented: convert(class 
org.eclipse.jdt.internal.compiler.ast.ForeachStatement)
org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1837)
org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:408)
org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:213)
org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1981)
org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:948)
org.eclipse.jdt.core.dom.ASTParser.convert(ASTParser.java:707)
org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:677)
org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:573)
org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:437)
org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:389)
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:123)
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$1.run(SelectionListenerWithASTManager.java:101)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Comment 1 Dirk Baeumer CLA 2004-05-25 04:27:18 EDT
Dani, this is what we have discussed yesterday. 
Comment 2 Dani Megert CLA 2004-05-25 06:11:22 EDT

*** This bug has been marked as a duplicate of 59052 ***