Bug 3225 - IJavaProject.findPackageFragment strange semantic (1GAOLWQ)
Summary: IJavaProject.findPackageFragment strange semantic (1GAOLWQ)
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:51 EDT by Dirk Baeumer CLA
Modified: 2002-01-11 09:04 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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