Community
Participate
Working Groups
RC1 See setup from bug 65234. proj src org eclipse mypack A.java otherpack B.java Set an inclusion filter of src to "org/eclipse/mypack/". The package explorer shows a package in flat mode, but not in hierarchical mode.
The problem is that in the given scenario the folder proj/src/org doesn't can't be converted into a package fragment. Calling JavaCore.create ("proj/src/org") return null. The hierarchical layout assumes that if org.eclipse.mypack is a package org and org.eclipse are packages as well. This doesn't seem to be the case with inclusion filters anymore.
Jerome pointed out that the inclusion filter is equivalent to an exclusion filter: org/*.java, org/eclipse/*.java. Have to check what we do here.
This isn't equivalent. Specifying these exclusion filters still reports org and org.eclipse as packages.
It looks like we're inconsistent here: - for an inclusion filter org/eclipse/mypack/, org and org.eclipse are not package fragments - for an exclusion filter org/*.java|org/eclipse/*.java, org and org.eclipse are package fragments The exclusion filter case sounds like a bug, but fixing it might break the UI. If we go the other way around (i.e. fix the inclusion filter case so that org and org.eclipse are package fragments), UI would be happy, but this is not what other clients of the Java model would expect.
I was not quite right: an org/eclipse/mypack inclusion filter is equivalent to an org/*|org/eclipse/* exclusion filter. However even in this case we're still inconsistent as described in comment #4.
Entered bug 65637 against JDT Core for the inconsistency issue.
This can't be fixed for 3.0 and has to be doced as a known limitation. The hierarchical mode in package explorer and packages view is based on the assumption the Java elements have Java elements as parents. This isn't the case when excluding parents or explicitly including children. Fixing this is basically a rewrite of the hierarchical layout mode which isn't an option so shortly before 3.0.
*** Bug 69491 has been marked as a duplicate of this bug. ***
*** Bug 75105 has been marked as a duplicate of this bug. ***
*** Bug 83491 has been marked as a duplicate of this bug. ***
Should'nt you switch the Package Explorer to flat, disable the menu and set a tool tip text, if there is an open project with includes for a source folder of an classpath item of its build paths block? But, you need the answer for the previous question. Is somewhere a class SourceFolder to ask? (and to get and to set...) Should'nt it be?
*** Bug 83407 has been marked as a duplicate of this bug. ***
*** Bug 86251 has been marked as a duplicate of this bug. ***
This will not make it into 3.1. The workaround is to use flat layout when dealing with inclusion filters.
fixed > 20060111 IPackageFragment can now have an IFolder as parent and IFolder can have IPackageFragment as child in the package explorer. Please reopen if fix of bug 65234 does break the package explorer. The java browsing perspective does have the exact same problem. Created new bug 123424 since it is not the same code.