Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315830

Summary: Allow folders to be excluded from indexing
Product: [Tools] PTP Reporter: Jeffrey Overbey <com-eclipse-dot-org>
Component: Photran.For Internal UseAssignee: Photran Inbox <photran-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P4 CC: dharenberg, photran.20.krukruk, rohou
Version: 6.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Jeffrey Overbey CLA 2010-06-04 15:58:22 EDT
Cactus's build procedure preprocesses Fortran code into a "configs" folder which is part of the project but should not be indexed (since the user should only be navigating the original source).  It would be helpful if the user could specify that this folder be excluded from indexing.
Comment 1 Daniel Harenberg CLA 2011-03-14 10:47:26 EDT
Another reason to allow the user to select / manually exclude folders: There could also be folders with f90 source code that the user doesn't want to be indexed (e.g. unfinished code pieces).
Comment 2 Daniel Harenberg CLA 2011-03-19 12:53:24 EDT
One solution (which came up on the Photran mailing list) would be: do not index derived resources. Then, if the user doesn't want a folder to be indexed, he could simply check the existing box in the folder properties -> Resource -> Attributes: Derived

At least for my use case (unfinished pieces of code in a subfolder) that would be sufficient, and it would use existing features.
Comment 3 Daniel Harenberg CLA 2011-03-19 12:56:20 EDT
Speaking of it, I am surprised that non of the other non-source-folders, like Debug, .settings, Binaries,..., seems to have the derived flag. Not sure whether this is a Photran issue.
Comment 4 Jeffrey Overbey CLA 2011-03-19 14:23:44 EDT
Hmm... that would work, but it doesn't exactly match what derived resources were intended for.  From the Eclipse SDK [1]: "Derived resources are resources that are not original data, and can be recreated from their source files. ... The concept of derived resources is provided for other (non-team) plug-ins to indicate which resources are inappropriate for repository management."  I.e., it indicates, "Don't store this folder in CVS, since Eclipse will re-generate it if you check out the code in a fresh workspace."

Derived resources would be appropriate for the Cactus scenario (since the configs folder is used only for the build process).  But I think, in general, whether you want to index a folder or not could be independent of whether or not that folder is stored in a team repository (CVS).  For example, I've occasionally seen an "old" folder for code that isn't part of the system anymore but still has some value; I'd want that code in CVS, but I wouldn't necessarily want it indexed.

What about your case, Daniel?  Is your unfinished code stored in CVS/Subversion/whatever?  If not, excluding derived folders from indexing would be an almost trivial change... certainly easier than a custom system for excluding folders...

[1] http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.isv/guide/resAdv_derived.htm
Comment 5 Daniel Harenberg CLA 2011-03-20 08:02:04 EDT
(In reply to comment #4)
Thanks for the explanation, I understand better now. At the moment, I don't use a repository, but if I did, I'd probably like those unused files to be stored as well, since some of them are going to be used at a later stage. So I see that the proposed solution (with the 'derived' flag) would not work. At this point, my view is that it's not worth to put a lot of work into this small feature. Rather, another solution proposed on the mailing list should suffice - at least in my case: rename unused files to .txt (or probably anything that is not a Fortran extension), which should exclude them from indexing.