Bug 3133 - API - clarify IProjectDescription.setLocation (1GKS62X)
Summary: API - clarify IProjectDescription.setLocation (1GKS62X)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:50 EDT by Jim des Rivieres CLA
Modified: 2001-10-25 11:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim des Rivieres CLA 2001-10-10 22:50:02 EDT
The API spec for IProject.setLocation is ambiguous:

public void setLocation(IPath location)
	Sets the local file system location for the described project. If null is specified, the default location
is used. Setting the location on a description for a project which already exists has no effect; the
new project location is ignored when the description is set on the already existing project. This
method is intended for use on descriptions for new projects or for destination projects for copy
and move.

Observe: From the spec alone, you can't infer whether this maps the root folder for the project
to the directory at the given path, or to a child of the directory at the given path.
That is, if I setLocation("C:\junk\") for project P and then create P, should I expect to
see
(a) the files and folders in C:\junk\ show up as files and folder inside project P
or should I see
(b) the files and folders in C:\junk\P\ show up as files and folder inside project P

Expectation: The spec should clarify that it works like (a).

NOTES:
Comment 1 John Arthorne CLA 2001-10-15 17:07:25 EDT
Added the following paragraph:

 * This operation maps the root folder of the project to the exact location
 * provided.  For example, if the location for project named "P" is set
 * to the path c:\my_plugins\Project1, the file resource at workspace path
 * /P/index.html  would be stored in the local file system at 
 * c:\my_plugins\Project1\index.html.
Comment 2 DJ Houghton CLA 2001-10-24 06:45:28 EDT
PRODUCT VERSION:

build 135

Comment 3 Rodrigo Peretti CLA 2001-10-25 11:19:09 EDT
Fixed in v205.