Summary: | [hierarchical packages] '.' in folder names confuses package explorer | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Misko Hevery <misko> | ||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | daniel_megert, martinae | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.3 M1 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Misko Hevery
2006-05-18 12:24:59 EDT
Created attachment 41903 [details]
Example of a JAR file which produces the bug
Move to JDT/UI This is a very tricky... The JAR contains a folder with dots in the name. The Java model returns that folder as a package. The hierarchical content provider makes the assumption that when it gets a package 'a.b.c', it will also get the package 'a' and 'a.b' This isn't the case here as there are no such folder. I didn't find a way to detect this: In a JAR I can't get any information about the underlying resources / jar entries. I think the Java model is wrong to return this as a package at all. Shouln't this be returned as a folder? Packages aren't allowed to contain '.' in the name. Moving to jdt.core for comments. Changed JarPackageFragmentRoot#computeChildren(...) to add zip entries that have not a valid package name as non-Java resources instead of package fragments. Updated tests in JavaProjectTests to reflect this change. Released for 3.3 M1 in HEAD. Note that the is still a rendering problem of non-Java directories in .jar files. I entered bug 148657 to capture this. Added regression test JavaProjectTests#testPackageFragmentNonJavaResources6() for this very bug. Verified for 3.3 M1 using build I20060807-0010. NOTE: this is not yet fully fixed, see bug 148944. |