Bug 31383

Summary: Strange rendering of of link resources when link points to Eclipse workspace
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2003-02-07 18:48:02 EST
I20030206

- create a Java project
- select new Folder
- enter name link
  Link the folder to an existing workspace.

Observe: the package explorer shows a lot of resource having the ghost icon and 
named link..metadata..config.*

PLEASE NOTE: don't delete the link folder since this will delete the content of 
the link as well, also state otherwise
Comment 1 Dirk Baeumer CLA 2003-02-07 19:01:22 EST
The strange rendering is caused by folders and files starting with a .
Comment 2 Dirk Baeumer CLA 2003-02-09 13:22:36 EST
I think the Java Model treats these folders as packages but gets confused by 
the . in the name.
Comment 3 Dirk Baeumer CLA 2003-02-10 05:44:18 EST
Here is a first analysis for the follwing small test case:

- create normal projetc Test
- create a folder link under c:\tmp
- create a folder .folder in link
- create a file in folder .folder
- create a folder link under Test. Use the advance settings and link
  it to c:\tmp\link

The Java Model treats the new folder link and its sub folders as packages, 
resulting in a package link..folder which seems to confuse the Java Model.
When we receive the IPackageFragement for rendering exists() on the package 
returns false;

I would expect that link..folder isn't reported as a package fragment.

Moving to JDT/Core for comments
Comment 4 Philipe Mulet CLA 2003-02-10 09:28:21 EST
Jerome - aren't we eliminating .names from valid Java package segment name ?
Comment 5 Jerome Lanneluc CLA 2003-02-14 06:15:17 EST
Note this is not a problem with link folder. If you create a folder p and a 
subfolder .folder under the project in the file system and do a refresh, you 
see the same behavior.

Problem is with the DeltaProcessor that adds subpackages without verifying it 
is a valid package name.

Fixed and added regression test JavaElementDeltaTests.testAddInvalidSubfolder()
Comment 6 David Audel CLA 2003-02-25 04:56:09 EST
Verified.