Bug 32041

Summary: Multiple output folders fooling Java Model
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2003-02-17 13:19:16 EST
Build 20030214

Setup from bug 32040 (prj==src(with custom bin2), default output=bin), observe 
that 'bin2' is displayed as empty package in package explorer (it should not be 
visible at all).
Comment 1 Kent Johnson CLA 2003-02-18 13:31:15 EST
The more interesting scenario is:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="" excluding="src1/|src2/"/>
    <classpathentry kind="src" path="src1" output="bin1"/>
    <classpathentry kind="src" path="src2" output="bin2"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

In this case, you have several source folders defined inside the project, which 
is still acting as its own source folder. The source folders are explicitly 
excluded from the project BUT not their output folders. The question is why not?

Why were the additional source folders added to the exclusion list, but their 
output folders weren't?

This isn't necessary unless the project is acting as a source folder at the 
same time.
Comment 2 Jerome Lanneluc CLA 2003-02-19 05:09:33 EST
You should never have to add output folders to exclusion filters as output 
folders should never be visible through the Java model (see IJavaModel.contains
(...))
Comment 3 Jerome Lanneluc CLA 2003-02-19 05:21:49 EST
Changed PackageFragmentRoot.computeFolderChildren(...) to check if the folder 
is visible through the Java model (using contains()).

Added regression test JavaProjectTests.testRootGetPackageFragments2()
Comment 4 Jerome Lanneluc CLA 2003-02-20 11:15:44 EST
.java files in 'bin' and 'bin2' should not be indexed either.
Fixed IndexAllProject to not walk output folders and added regression test 
ExclusionPatternTests.testSearchPotentialMatchInOutput()
Comment 5 David Audel CLA 2003-02-25 06:34:44 EST
Verified.