Community
Participate
Working Groups
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:
PRODUCT VERSION: SDK 0.106, CVS
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 ?
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 got revised (2001/01/28). Closing