Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353468

Summary: [completion] completing a method binding inserts nested class by its binary name
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTDTAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M5   
Hardware: Other   
OS: Linux   
Whiteboard:

Description Stephan Herrmann CLA 2011-07-31 11:34:43 EDT
In a role bound to org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2
I was adding a method binding to 
createImplementationStub(ICompilationUnit, ASTRewrite, ImportRewrite, ImportRewriteContext, IMethodBinding, String, CodeGenerationSettings, boolean)
which rendered the signature with ImportRewrite$ImportRewriteContext
which certainly didn't compile.

Additionally, all types were mentioned using the fully qualified name,
which too is undesirable.
Comment 1 Stephan Herrmann CLA 2011-08-27 10:31:28 EDT
Put on radar.
Comment 2 Stephan Herrmann CLA 2012-01-31 07:24:39 EST
I've added CodeCompletionTest#testCreateMethodBinding1() along the lines of comment 0 (commit e85de3c3dfa8033bf81f31b8d3392d6c991e3b98).

However, neither using the test nor in real-life experiments against the exact method mentioned was I able to reproduce the problem. All imports were created properly, all types were referenced by the simple names.

There's a slight chance that recent improvements regarding import rewriting also fixed this.
Comment 3 Stephan Herrmann CLA 2012-09-22 16:17:47 EDT
Verified using build 2.2.0.201209221349