Bug 119161

Summary: classes in "deep" packages not fully recognized when using tight inclusion filters
Product: [Eclipse Project] JDT Reporter: Howard <valencez17>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tacpub
Version: 3.1.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch and regression tests none

Description Howard CLA 2005-12-03 01:00:17 EST
classes in "deep" packages not fully recognized when using tight inclusion filters.  This is a problem especially if the source code resides in a hierarchy of folders containing sources that should mostly be ignored.

Thanks for any help.

- Howard

To reproduce:

1.	Create empty Java project

2.	Create class C in a "deep" (i.e., more than 1 level deep) package.

	package x.y;

	public class C {
	}

3.	Create class B to reference class C

	package z;

	import x.y.C;

	public class A {
		C m_c;
	}

4.	Configure inclusion/exclusion filters [for Java Build Path] to have inclusion patterns:

	x/y/*.java
	z/*.java

5.	Sources compile but:

	a.	Warnings appear next to import statements in class A.
		Quickfix does not help.

	b.	Cannot refactor m_c in class A.
Comment 1 Jerome Lanneluc CLA 2005-12-09 05:21:49 EST
Would need to change INameEnvironment#isPackage(...) to return true if one of the subpackages is included.
Comment 2 Jerome Lanneluc CLA 2005-12-16 10:31:44 EST
Created attachment 31874 [details]
Proposed patch and regression tests
Comment 3 Jerome Lanneluc CLA 2006-01-05 09:01:40 EST
Released fix and regression test to HEAD.
Comment 4 Jerome Lanneluc CLA 2006-01-09 04:44:43 EST
*** Bug 122983 has been marked as a duplicate of this bug. ***
Comment 5 Frederic Fusier CLA 2006-02-14 06:32:57 EST
Verified for 3.2 M5 using build I20060214-0010.