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

Bug 358522

Summary: Can not use library in default package
Product: z_Archived Reporter: Yu Hao <yuhaodl>
Component: EDTAssignee: Xiao Bin Chen <xiaobinc>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chenzhh, jspadea, xiaobinc, yuhaodl
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch for this defect lasher: iplog+

Description Yu Hao CLA 2011-09-22 03:16:07 EDT
Build Identifier: 0.7.0.v201109212102

Create a library in default package, then 'use' this library in a program. the library can NOT be resolved and use EGL Source->Organize Imports can NOT import the default package

Reproducible: Always

Steps to Reproduce:
1.Create a library 'comlib' with wizard in default package
2.Create a program, type 'use com' then Content Assist will completed it to "use comlib"
3.There will be an error for "use comlib"
4.Use context menu EGL Source->Organize Imports but it can not import the default package
Comment 1 Justin Spadea CLA 2011-09-22 09:08:11 EDT
Is your program defined in the default package? If a part is not defined in the default package then it cannot reference anything in the default package (just like with Java). There is no way to import the default package, therefore Organize Imports doesn't do anything.

I tried a basic program and basic library both in the default package and it compiled without errors.

The only defect I see here is that content assist should not be providing the library as a choice when it's in the default package and the active part is not in the default package.
Comment 2 Yu Hao CLA 2011-09-22 20:55:55 EDT
No,my program is NOT in the default package.

I involved XiaoBin to see this Content Assist issue
Comment 3 Xiao Bin Chen CLA 2011-10-20 04:50:53 EDT
Created attachment 205593 [details]
patch for this defect
Comment 4 Xiao Bin Chen CLA 2011-10-20 21:54:30 EDT
fixed.
Comment 5 Yu Hao CLA 2011-10-27 21:19:06 EDT
verified in 201110262101