Bug 65234 - Inclusion filter not working
Summary: Inclusion filter not working
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-02 04:55 EDT by Martin Aeschlimann CLA
Modified: 2017-06-01 07:05 EDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (989 bytes, patch)
2004-06-03 07:40 EDT, Jerome Lanneluc CLA
no flags Details | Diff
Regression tests (2.90 KB, patch)
2004-06-03 07:42 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2004-06-02 04:55:36 EDT
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.
Comment 1 Martin Aeschlimann CLA 2004-06-02 05:11:39 EDT
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;
}
Comment 2 Jerome Lanneluc CLA 2004-06-03 07:40:20 EDT
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.
Comment 3 Jerome Lanneluc CLA 2004-06-03 07:42:38 EDT
Created attachment 11531 [details]
Regression tests

Added InclusionPatternTests#testCreateResourceIncludedCompilationUnit2() and
testCreateResourceIncludedPackage2()
Comment 4 Dirk Baeumer CLA 2004-06-03 13:07:14 EDT
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.
Comment 5 Jerome Lanneluc CLA 2004-06-03 13:11:11 EDT
Philippe will have to review it first. But he's away until Monday. If this is 
urgent, please send him e-mail.
Comment 6 Jerome Lanneluc CLA 2004-06-07 13:25:55 EDT
Philippe just reviewed the patch. Patch released.
Comment 7 Olivier Thomann CLA 2004-06-11 10:38:21 EDT
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.
Comment 8 Olivier Thomann CLA 2004-06-11 10:57:40 EDT
Verified in 200406110010.
The remaining problem is in the UI. See bug 66694
Comment 9 Jay Arthanareeswaran CLA 2017-06-01 07:05:37 EDT
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