Bug 22039 - Provide facility to exclude files from compilation
Summary: Provide facility to exclude files from compilation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 22409 24127 24583 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-30 10:57 EDT by Amelia A Lewis CLA
Modified: 2002-12-18 06:04 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amelia A Lewis CLA 2002-07-30 10:57:54 EDT
This request has been made at least a couple of times on newsgroups; it is most
commonly encountered using version control, but is not a version control problem.

One can exclude certain files from inclusion in a jar, can hide certain files
associated with version control from the UI, and can prevent resources from
being copied into the build tree.

However, it is not possible to prevent .java files from being built.  This is
sometimes required.  Ant permits it (several different means to specify).  Using
eclipse with an existing project that relies upon an exclusion facility (such as
ant or IntelliJ's IDEA) is quite difficult.  The typical workaround is to delete
(outside of version control) the files and directories that cause problems. 
They reappear when the version control system refreshes.  Other workarounds are
even more baroque (I helped build a script to populate a tree of symlinks ...
not the ideal solution).

Please consider adding an "exclude" button to the UI for sourcepath, and adding
an internal storage, and comprehension of what it means to exclude to core.
Comment 1 Philipe Mulet CLA 2002-07-30 12:06:44 EDT
Would such excluded files be excluded from building only, or not available 
completely (search, code assist, package view, etc...).
Comment 2 Amelia A Lewis CLA 2002-07-30 14:01:07 EDT
I'd say that minimal functionality for the feature would be to suppress building
only.  If the information was supplied to the plugins, then they might allow
further customization (hide it if it won't be compiled).  This might be
permitted in the package view as an option, or possibly an icon decoration in
the tree.

Note that if it isn't compiled, then it can't *contribute* to code completion. 
I don't see why code completion (of other defined interfaces and such) inside
the editor, when the file is open, would be suppressed.
Comment 3 Philipe Mulet CLA 2002-07-31 06:22:35 EDT
What you mean is that these files would not be treated as compilation units but 
rather as resource files.

This means, they would not get compiled, indexed for search and presented in 
the package view (except as non-java resources).

At least this story would be consistent.

You can experiment this minimalistic behavior by copying a java file outside 
the classpath. You can still open it in a Java editor and perform some Java 
actions on it, but with minimal support of course.
Comment 4 Philipe Mulet CLA 2002-10-02 09:47:04 EDT
*** Bug 22409 has been marked as a duplicate of this bug. ***
Comment 5 Philipe Mulet CLA 2002-10-10 06:35:46 EDT
*** Bug 24583 has been marked as a duplicate of this bug. ***
Comment 6 Philipe Mulet CLA 2002-11-20 16:55:25 EST
*** Bug 24127 has been marked as a duplicate of this bug. ***
Comment 7 Philipe Mulet CLA 2002-12-02 10:57:36 EST
Exclusion filters got added to source folder, providing this ability.
UI for it is on its way (for 2.1M4).

Fixed.
Comment 8 David Audel CLA 2002-12-18 06:04:47 EST
Verified.