Community
Participate
Working Groups
If certain refactorings are attempted with a Cheetah-enabled 3.0M8 installation on a source file with some of the new-style for loops, the following exception shows up and the dialog for configuring the refactoring does not: java.lang.IllegalArgumentException: Not yet implemented: convert(class org.eclipse.jdt.internal.compiler.ast.ForeachStatement) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1792) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:398) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:209) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1936) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:931) at org.eclipse.jdt.core.dom.AST.convertCompilationUnit(AST.java:239) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:81) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:700) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:739) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1111) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1080) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:85) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:145) at org.eclipse.jface.text.reconciler.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:111) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:123) at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:104) at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:280) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:155) Commenting out the foreach loops allows the refactoring to proceed. Using JDT core 3.0.0.cheetah03 installed through the CVS checkout updater.
Remember that tools outside compiler have not yet been leveraged to support 1.5. Support will gradually come.
The problem is that the reconciler is only using AST level 2.0 and to get the 1.5 constructs it would need to use the AST level 3.0. There is no much I can do about this.
*** This bug has been marked as a duplicate of 59052 ***