Community
Participate
Working Groups
N20060407-0010 Steps to reproduce: - Have org.eclipse.jface binary in workspace - Open type TreeSelection - Open outline - Invoke Use Supertype Where Possible on TreeSelection in outline - Select ITreeSelection - Press Finish -> CCE occurs: Caused by: java.lang.ClassCastException: org.eclipse.jdt.internal.core.JavaProject at org.eclipse.jdt.core.dom.TypeBinding.getPackageFragment(TypeBinding.java:648) at org.eclipse.jdt.core.dom.TypeBinding.getClassFile(TypeBinding.java:130) at org.eclipse.jdt.core.dom.TypeBinding.getUnresolvedJavaElement(TypeBinding.java:483) at org.eclipse.jdt.core.dom.TypeBinding.getUnresolvedJavaElement(TypeBinding.java:408) at org.eclipse.jdt.core.dom.TypeBinding.getJavaElement(TypeBinding.java:401) at org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.TypeEnvironment.createStandardType(TypeEnvironment.java:337) at org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.TypeEnvironment.create(TypeEnvironment.java:197) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeRefactoringProcessor.solveSuperTypeConstraints(SuperTypeRefactoringProcessor.java:1068) at org.eclipse.jdt.internal.corext.refactoring.structure.UseSuperTypeProcessor.createChangeManager(UseSuperTypeProcessor.java:264) at org.eclipse.jdt.internal.corext.refactoring.structure.UseSuperTypeProcessor.checkFinalConditions(UseSuperTypeProcessor.java:165) at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:174) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:118) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Jerome, This is a new occurance of the problem Markus got last week. Tobias, When I follow the steps, I select ITreeSelection, but nothing happens when I press OK (no Finish button). I get "No possible update found" besides the ITreeSelection name.
Olivier, This is by design. If you have ie. jdt.core in the workspace and JFace as binary, there are no type occurrences of TreeSelection which could be updated. Otherwise, if there are opportunities to replace TreeSelection by ITreeSelection, please file a bug against JDT UI.
To reproduce, you also have to import org.eclipse.jdt.ui as source into your workspace (I got it in a clean N20060411-0010 with only these two projects).
*** Bug 135573 has been marked as a duplicate of this bug. ***
Created attachment 38291 [details] Proposed patch and regression test
+1 for 3.2RC1
Released patch and regression test
Verified for 3.2 RC1 using build I20060413-0010