Bug 32041 - Multiple output folders fooling Java Model
Summary: Multiple output folders fooling Java Model
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-17 13:19 EST by Philipe Mulet CLA
Modified: 2003-02-25 06:34 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.