Community
Participate
Working Groups
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
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
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
Created attachment 13131 [details] Source that reproduces the problem As discussed in recent c discussion.
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.
I haven't checked but I don't believe the folders being empty is significant, but maybe adding files to them is. Peter Miller.
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.
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.
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.
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.
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 :)