Community
Participate
Working Groups
Version: 2.1.1 Build id: 200306271545 IJavaProject>>getOutputLocation Returns the default output location for this project as a workspace- relative absolute path. Now if I have a project that is outside the standard workspace directory, I can't rely on the location of the workspace directory, because it would give me a wrong result. Example: IPath outpath = project.getOutputLocation() -> /MyProject/bin IPath projpath = project.getUnderlyingRsource().getLocation() -> c:/outside/MyProject IPath rootpath = workspaceroot.getLocation() -> c:/workspace To get the absolute path to the output directory I have to IPath absolute = projpath.removeLastSegments(1).append(outpath); In my moind it makes no sense to return the output location relative to the workspace root in any case. Same for output locations of IClasspathEntry. IProject.getOutputLocation() and IClasspathEntry.getOutputLocation() should return the project-relative path.
Every resource path has the same issue, it may be different from the location. This isn't specific to a project output location, and is documented on resource APIs. Furthermore, changing such an API at this stage would simply be breaking compatibility. Closing.