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

Bug 326061

Summary: [wizard] new role wizard inserts bogus base import if base is from the same package
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTDTAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7   
Target Milestone: 0.8 M5   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix none

Description Stephan Herrmann CLA 2010-09-23 10:18:28 EDT
Consider a team and a base living in the same package.
Create a role bound to the base using the new role wizard.

The wizard will insert an import base declaration mentioning
the base class without qualification, which is unnecessary and wrong.
Comment 1 Stephan Herrmann CLA 2011-01-29 07:41:17 EST
Created attachment 187904 [details]
fix

This patch improves base class imports by using the current IType
to resolve the base class. Given an ITypeBinding or a qualified name
the ImportRewriteAnalyzer correctly filters implicit imports.
Comment 2 Stephan Herrmann CLA 2011-01-29 07:42:37 EST
Patch has been committed as r1279.
Comment 3 Stephan Herrmann CLA 2011-01-29 14:07:38 EST
Verified for 0.8M5 using build 201101290806.