Bug 3268 - create(IProject) strange for normal projects (1GDVTER)
Summary: create(IProject) strange for normal projects (1GDVTER)
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:52 EDT by Dani Megert CLA
Modified: 2002-02-12 07:57 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 Dani Megert CLA 2001-10-10 22:52:18 EDT
When I called JavaCore.create(IProject) I would have expected to get
	null when the input is a non-JavaProject:
	The API says null is returned if it cannot be associated with a JavaProject.
	This should be state in clearer way (if null is not what I should get).

	I then called exist() on the returned project and received true.

	Is this like it should be? Is the only way to be sure to work on a "real"
	JavaProject to go via its nature?


NOTES:
Comment 1 DJ Houghton CLA 2001-10-23 23:53:32 EDT
PRODUCT VERSION:
	SDK 0.106, CVS


Comment 2 Philipe Mulet CLA 2002-02-02 07:00:11 EST
I think this behavior is fine. You can create Java handles on any resource, 
then depending on the action you are willing to perform, there is more or less 
you can do on this element.

I could imagine being able to create a Java project on a non-yet Java enabled 
project, this way the resource can be configured for being Java enabled.

Ok to close ?
Comment 3 Dani Megert CLA 2002-02-04 08:13:39 EST
I can live with the behavior but would like the Javadoc spec being a bit more
clear. It says:
	 * Returns the Java project corresponding to the given project, or
	 * <code>null</code> if unable to associate the given project
	 * with a Java project.

When I read "unable to associate the given project with a Java project" I
concluded that it can only be associated if such a Java project exists. It would
be good if the spec would tell what "associate" means.
Comment 4 Philipe Mulet CLA 2002-02-12 07:56:13 EST
Comment got revised (2001/01/28). Closing