Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 394568 - External folders project does not have Java nature
Summary: External folders project does not have Java nature
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.3 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-19 08:34 EST by Karsten Thoms CLA
Modified: 2012-12-10 03:34 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2012-11-19 08:34:33 EST
During analyzation of Bug#338695 I stumbled over the fact that the ExternalModelManager creates a project that does not have the Java nature set. Thus, methods that try to use this project as IJavaProject, will fail.

Steps to reproduce:
IProject externalFoldersProject = ResourcesPlugin.getWorkspace().getRoot().getProject(".org.eclipse.jdt.core.external.folders");
IJavaProject jp = JavaCore.create(externalFoldersProject)
jp.findType("java.lang.String")

=> JavaModelException

I think the ExternalModelManager should initialize the project with a Java nature.
Comment 1 Jay Arthanareeswaran CLA 2012-11-19 08:58:53 EST
External folders' project is an internal project used for a very specific purpose - provide links for external resources. It will not have any classpath entries or JRE library on it's classpath. Why would you need to do something like what you are trying to do?
Comment 2 Karsten Thoms CLA 2012-11-19 09:58:44 EST
I am trying to resolve a type from this project, but I it seems that I might be on the wrong track to solve my issue, and the root cause might be that I should not even try to resolve the type on this special project, rather on the project above.

Closing this as invalid.
Comment 3 Jay Arthanareeswaran CLA 2012-11-19 10:20:09 EST
(In reply to comment #2)
>  I should not even try to resolve the type on this special project, rather on
> the project above.

 Yes, as you said, you should work on the actual project.

> Closing this as invalid.
 Thanks!
Comment 4 Jay Arthanareeswaran CLA 2012-12-10 03:34:36 EST
The bug reporter has agreed it's not a bug. 
Verified for 4.3 M4.