Community
Participate
Working Groups
200411050810 On a raw TypeBinding of 'java.util.Comparable', method getJavaElement() throws the exception below. [Not reproducible in eclipse - client code is not in CVS.] !ENTRY org.eclipse.ui 4 0 2004-11-08 18:35:29.163 !MESSAGE Compilation unit name must end with .java !STACK 0 java.lang.IllegalArgumentException: Compilation unit name must end with .java at org.eclipse.jdt.internal.core.PackageFragment.getCompilationUnit(PackageFragment.java:191) at org.eclipse.jdt.core.dom.TypeBinding.getCompilationUnit(TypeBinding.java:449) at org.eclipse.jdt.core.dom.TypeBinding.getJavaElement(TypeBinding.java:293) at org.eclipse.jdt.core.dom.MethodBinding.getJavaElement(MethodBinding.java:200) at org.eclipse.jdt.internal.corext.dom.Bindings.asUIString(Bindings.java:101) at org.eclipse.jdt.internal.ui.text.correction.UnimplementedMethodsCompletionProposal.getAdditionalProposalInfo(UnimplementedMethodsCompletionProposal.java:266) at org.eclipse.jface.text.contentassist.AdditionalInfoController.computeInformation(AdditionalInfoController.java:221) at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:761) at org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:751) at org.eclipse.jface.text.contentassist.AdditionalInfoController$1.run(AdditionalInfoController.java:173) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:118) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2771) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2451) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1529) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1500) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:276) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688) Compilation unit name must end with .java
JDT UI note: Update Bindings/PullUpRefactoring
This problem also occurs with parameterized binary types (e.g. ArrayList<Integer>). Adapting summary.
Changed TypeBinding#getJavaElement() to take the erasure of the type if it is a raw or parameterized type. Added regression tests ASTModelBridgeTests#testParameterizedBinaryType() and testRawBinaryType()
*** Bug 79580 has been marked as a duplicate of this bug. ***
Verified for 3.1 M4 using build I200412142000.