Community
Participate
Working Groups
RC1 My project has the following setup: proj src org eclipse mypack A.java otherpack B.java I set the classpath to <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry including="org/eclipse/mypack/" kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath> The result is that the package explorer shows nothing but a resource folder 'org' in src. The type 'A' is not a Java element and not also found in the open type dialog.
I was wrong, the package explorer shows the element in 'flat' mode but not in hierarchical mode (will file a separate bug for this), but the 'Open Type' dialog doesn't. I also can not access A from a type X in source folder src2 package other; import org.eclipse.mypack.A; <- 'Import org.eclipse cannot be resolved' public class X { A a; }
Created attachment 11530 [details] Proposed patch Changed DeltaProcessor#elementType(...) to handle the case of a folder corresponding to a package and that has its parent being a non-Java resource.
Created attachment 11531 [details] Regression tests Added InclusionPatternTests#testCreateResourceIncludedCompilationUnit2() and testCreateResourceIncludedPackage2()
Jerome, which build will include this fix. We are locking at other problems with inclusion filters and it would be good to have a fix for this one.
Philippe will have to review it first. But he's away until Monday. If this is urgent, please send him e-mail.
Philippe just reviewed the patch. Patch released.
Not verified in 200406110010. org eclipse mypack A.java is shown twice. Once as a compilation unit and once as a non-java resource. In hierarchy mode, org.eclipse.mypack.A.java doesn't show the right icon.
Verified in 200406110010. The remaining problem is in the UI. See bug 66694
Not sure we should reopen this as this seems like an one off case. This was seen again: http://download.eclipse.org/eclipse/downloads/drops4/I20170531-2000/testresults/html/org.eclipse.jdt.core.tests.model_ep47I-unit-win32_win32.win32.x86_8.0.html