Summary: | Problems with IJavaModel.findPackageFragment (1G456DO) | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> |
Component: | Core | Assignee: | 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 NT | ||
Whiteboard: |
Description
Dirk Baeumer
2001-10-10 22:51:16 EDT
The IJavaProject specs says to use '/'/ /** * Returns the first existing package fragment on this project's classpath * whose path matches the given (absolute) path, or <code>null</code> if none * exist. * The path can be: * - internal to the workbench: "/Project/src" * - external to the workbench: "c:/jdk/classes.zip/java/lang" * * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource */ IPackageFragment findPackageFragment(IPath path) throws JavaModelException; Closing Why got this PR closed. Is it fixed now. The first comment states that neither /junit/framework not junit/framework works as a path. So I am already using the / character as a path separator. The specs says how to use the API. You have to use a '/'. Looks in your case, you forgot the project prefix: '/JUnit/src/junit/framework'. Do I miss something ? Yup, forgot to add /JUnit/src to the path. It is a little bit confusing that if I call the method on an IJavaProject which represents the JUnit project that I have to prepend the path with the /JUnit/src. PR can be closed. Closing |