Bug 3225

Summary: IJavaProject.findPackageFragment strange semantic (1GAOLWQ)
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M1   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2001-10-10 22:51:36 EDT
I have a workspace with a JUnit project.

	Now I am using the method on IJavaProject.findPackageFragment to find a package fragment.
	If I search for a package fragement that contains to the project I have to use a path like this:

	/JUnit/junit/framework

	If I search for a package from the rt.jar the path must look like this

	/java/lang/reflect.

	If I don't know if the package belongs to a jar or to a project the method is almost "useless".

	Am I doing something wrong ?


NOTES:

PM (4/24/2001 3:12:30 PM)
	Specs say that the package from a jar should be fully qualified, e.g. "c:/jdk/classes.zip/java/lang".
	Need to check whether our implementation incorrectly allows relative path for jar roots.

	Seems weird though that relative paths are not the only ones we care about (is this for dealing with multiple identical package fragments ?).

JW (6/4/01 3:47:17 PM)
	We should not be introducing changes here at this point.  If the API is problematic, document as likely to change
	(but no changes for 0.9)

DA (6/20/01 12:29:16 PM)
	PR reactived after build 0.125.
Comment 1 Philipe Mulet CLA 2001-10-12 06:27:13 EDT
Closing
Comment 2 Dirk Baeumer CLA 2001-10-22 03:56:32 EDT
Closing the PR doesn't really help me. I still need a method that works
for both packages in source folders and in Jars. Are you going to add 
another method that does the job ?
Comment 3 Philipe Mulet CLA 2001-10-22 06:47:55 EDT
#findPackageFragment is using a full path.
For looking up elements which a project relative path, you should use: 
#findElement.

Comment 4 Dirk Baeumer CLA 2001-10-23 04:33:30 EDT
Thanks and Ok to close
Comment 5 Philipe Mulet CLA 2001-10-23 05:16:51 EDT
Closing
Comment 6 DJ Houghton CLA 2001-10-23 23:52:01 EDT
PRODUCT VERSION:
	0.033