Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 69565 - [Import/Export] empty folders not imported
Summary: [Import/Export] empty folders not imported
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Karice McIntyre CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-08 00:48 EDT by Pete Miller CLA
Modified: 2005-08-26 11:29 EDT (History)
2 users (show)

See Also:


Attachments
Source that reproduces the problem (7.54 KB, application/octet-stream)
2004-07-12 01:17 EDT, Pete Miller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pete Miller CLA 2004-07-08 00:48:04 EDT
Not sure if the Component should be UI (how *is* a user supposed to know, I ask
you? - and the link does not help!).

The Resource view shows folders named "private" and "public" but the Java
perspective does not. I did not choose the names and there is no reason why they
should not appear. This is not a filter issue as I removed all of them and they
still did not appear.

Regards,
Peter Miller
Comment 1 Dirk Baeumer CLA 2004-07-08 05:47:28 EDT
Pete,

which build are you using. I tested it with 3.0 and created a new project. 
Adding a folder "public" to it shows the folder as a child of the project. Of 
course you can't name a package "public" since this isn't allowed.

Please provide the following information:

- build you are using
- content of the log file (if any)
- steps to reproduce
Comment 2 Pete Miller CLA 2004-07-12 01:15:48 EDT
I am using 3.0, Id 200403261517. 

I imported a project that contained sub-folders named "private" and "public".
They appear in resource perspective, but not in the Java Package Explorer. If I
try to (re) create the folder I get an error. Could it be that the project was
imported? 

I have had a little play and reproduced with a simple structure. I attach
play.zip with the course. Unpack this as I used the "filesystem" import.

If you create a new project and then import the course, the folders do not appear.

Regards,
Pete Miller
Comment 3 Pete Miller CLA 2004-07-12 01:17:29 EDT
Created attachment 13131 [details]
Source that reproduces the problem

As discussed in recent c discussion.
Comment 4 Dirk Baeumer CLA 2004-07-12 04:58:25 EDT
Importing the attached zip doesn't create the folders private and public. They 
don't show up in neither the Navigator nor the package explorer. Putting files 
into the empty folders private and public creates the two folders and they are 
visible in Navigator and Package Explorer. 

Moving to Platform to comment on why empty folders aren't created.
Comment 5 Pete Miller CLA 2004-07-13 03:03:50 EDT
I haven't checked but I don't believe the folders being empty is significant,
but maybe adding files to them is.

Peter Miller.
Comment 6 Tod Creasey CLA 2004-07-19 14:54:29 EDT
I'm pretty sure empty folders in a zip will not show up as ZipEntries (I will 
need to check) hence we would not be able to import them.
Comment 7 Michael Fraenkel CLA 2004-07-19 23:40:32 EDT
Empty directories show up as ZipEntry.  There are actually a couple of issues 
in order to fix this.  You can make the empty directories appear in the UI 
with some work.  Directories are currently being filtered.  The directories 
that appear are the ones that have files since thats how the tree is being 
built.  However, only the files selected in the right pane are ultimately 
imported/exported.  The only way to fix this problem is to also include all 
selected directories as well.
Comment 8 Pete Miller CLA 2004-07-21 22:29:55 EDT
As I have said previously, I do not believe this issue is related to the
directories being empty: when I discovered the issue the folders did contain
files. Neither is it an import issue: the directories actually exist in the
workspace. They do not, however, display in the IDE, even with all filters off!

Pete Miller.
Comment 9 Michael Fraenkel CLA 2004-07-21 23:00:12 EDT
The problem you report is different than the one I was talking about since I 
had, like others, to import your ZIP.
The problem you are seeing isn't really a problem but a limitation specified 
by the Java Language Specification.
A Java package is defined by section 6.5 as a sequence of identifiers.  An 
identifier is a set of characters which are keywords or certain literals.

If you have public or private outside of your src tree, they will appear.  Its 
only hidden when its contained within the source tree since its an invalid 
package name.
Comment 10 Billy Biggs CLA 2005-08-26 11:29:39 EDT
Given comment #9, it seems the original bug as filed is invalid, and so I am closing
this as such.

Part of this bug discussed importing from a zip file with empty folders, which is
covered better by bug 96704.

Sorry Peter that this didn't work out better, seems there was a lot of confusion :)