Project: JDT
Bug 101453 java.lang.UnsupportedOperationException: Operation only supported in JLS2 AST
Reported: 2005-06-23 10:30:24 | Status: verified fixed

I'm using a Code-Generator Plugin which works fine with Eclipse 3.0 but receive the Exception "java.lang.UnsupportedOperationException: Operation only supported in JLS2 AST " when doing the same generation (as works fine with Eclipse 3.0) with Eclipse 3.1M6: ava.lang.reflect.InvocationTargetException at com.jcoffee.development.plugins.eclipse.generator.action.Generator.execute (Generator.java:491) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:98) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1714) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:110) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:113) Caused by: org.eclipse.core.runtime.CoreException: java.lang.UnsupportedOperationException: Operation only supported in JLS2 AST at com.jcoffee.development.plugins.eclipse.generator.action.PostCheckOperation.exe cutePostCheck(PostCheckOperation.java:132) at com.jcoffee.development.plugins.eclipse.generator.action.PostCheckOperation.exe cute(PostCheckOperation.java:93) at com.jcoffee.development.plugins.eclipse.generator.action.Generator.finishGenera torRun(Generator.java:1458) at com.jcoffee.development.plugins.eclipse.generator.action.Generator.execute (Generator.java:471) I've found two previous bug-reports related to the same exception, but reported against Eclipse 3.0 and marked as RESOLVED since 3.1M1. In my case it just looks the other way round - working w/o problems in 3.0 but not in 3.1M6.

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/SortMembersOperation.java