Bug 79580 - IAE from IBidning.getJavaElement
Summary: IAE from IBidning.getJavaElement
Status: VERIFIED DUPLICATE of bug 78087
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-26 12:08 EST by Martin Aeschlimann CLA
Modified: 2004-12-15 05:48 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2004-11-26 12:08:25 EST
20041126

In
public class Test2 implements Comparable<String> {
}

get the binding for 'Comparable', then get its declared method and try
'getJavaElement()'

The following exception is thrown

!ENTRY org.eclipse.ui 4 0 2004-11-26 18:03:26.436
!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:119)
	at org.eclipse.jdt.core.dom.TypeBinding.getJavaElement(TypeBinding.java:345)
	at org.eclipse.jdt.core.dom.MethodBinding.getJavaElement(MethodBinding.java:203)
	at
org.eclipse.jdt.internal.ui.text.correction.UnimplementedMethodsCompletionProposal.getArgumentNames(UnimplementedMethodsCompletionProposal.java:166)
	at
org.eclipse.jdt.internal.ui.text.correction.UnimplementedMethodsCompletionProposal.createNewMethodDeclaration(UnimplementedMethodsCompletionProposal.java:119)
	at
org.eclipse.jdt.internal.ui.text.correction.UnimplementedMethodsCompletionProposal.getRewrite(UnimplementedMethodsCompletionProposal.java:84)
	at
org.eclipse.jdt.internal.ui.text.correction.ASTRewriteCorrectionProposal.addEdits(ASTRewriteCorrectionProposal.java:61)
	at
org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal.initializeTextChange(CUCorrectionProposal.java:135)
	at
org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal.performChange(CUCorrectionProposal.java:267)
	at
org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal.apply(CUCorrectionProposal.java:298)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:425)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.selectProposalWithMask(CompletionProposalPopup.java:367)
Comment 1 Markus Keller CLA 2004-11-26 18:34:20 EST
Works now with jdt.core from HEAD.

*** This bug has been marked as a duplicate of 78087 ***
Comment 2 Frederic Fusier CLA 2004-12-15 05:48:30 EST
Verified for 3.1 M4 using build I200412142000.