Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 298622

Summary: package-info.java with annotations confuses new java project wizard
Product: [Eclipse Project] JDT Reporter: Jason Trump <spormp>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: frederic_fusier
Version: 3.6   
Target Milestone: 3.6 M2   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
tiny project that demonstrates the bug (see repro steps) none

Description Jason Trump CLA 2009-12-29 17:36:01 EST
Build Identifier: M20090917-0800

When creating a new Java project from existing source, if you have a package-info.java file with package-level annotations, the project is created with incorrect source folder definitions.

Reproducible: Always

Steps to Reproduce:
1. unpack the attached archive, which contains a trivial project with annotated package-info.java
2. In the Java perspective menu bar, select File -> New -> Project
3. Select 'Java Project'
4. Select 'Create project from existing source'
5. Select the root directory of the unpacked archive
6. Click 'Next'
7. The generated project has two source folders, 'src/' and 'src/test'.  only 'src/' is correct, 'test' is a package.

Obviously you can manually fix the project settings; but this is confusing, especially since you have to remove an exclude from 'src/'.

thanks
jt
Comment 1 Jason Trump CLA 2009-12-29 17:38:03 EST
Created attachment 155118 [details]
tiny project that demonstrates the bug (see repro steps)
Comment 2 Frederic Fusier CLA 2009-12-30 05:58:23 EST
Move to JDT/UI
Comment 3 Frederic Fusier CLA 2009-12-30 05:59:33 EST
I've verified that this issue does no longer happen using 3.6M2...

*** This bug has been marked as a duplicate of bug 286406 ***