| Summary: | Eclipse reports errors in exclude source files | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Godmar Back <godmar> | ||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, remy.suen | ||||
| Version: | 3.5.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Godmar Back
Created attachment 170393 [details]
xml.bak should be ignored, but has errors flagged
As you can see, xml.bak has been excluded from the build path (the option "Build Path -> Use As Source Folder" is *ACTIVE*). Yet, I'm seeing numerous error reports stemming from the folder. How can this be?
Platform/IDE is for generic IDE-ish bugs like the 'Problems' view. This looks more like an issue with the Java tooling. I assume that either - the excluded folder has at least one folder which is on the build path. Note that you only exclude the folder from being built. Problem markers are always reported up to each folder and the containing project. - you didn't clean + build By saying "you assume that the folder contains a subfolder that is not excluded," are you implying that in order to exclude a folder, I need to perform a manual recursive traversal and exclude every single folder? In my case, that would be roughly 80 or so. By saying "you didn't clean + build," are you saying that the functionality of excluding source folders depends on the user having "cleaned and built," but you do not consider this apparently nonsense requirement a flaw? FWIW, from past experiences with Eclipse (where typically not even simple compiles work unless you clean, refresh, double clean and double refresh) I did all these things. I ended up shutting down eclipse, manually editing the .classpath file to ensure the correct exclusion path, then restarting it. For your edification, exclude paths are recursive - it is not necessary to recursively exclude every single subfolder if one wishes to exclude a folder. >By saying "you didn't clean + build," are you saying that the functionality of >excluding source folders depends on the user having "cleaned and built," It depends whether you have auto-build on or off. Obviously, if it is off, you are responsible to call the build command (clean is not strictly needed, it just makes sure you start from a clean point after changing the build path). > For your edification, exclude paths are recursive We implemented it, so we know what it does or does not. Whether it's recursive or not is irrelevant since the build path allows to exclude a folder but include some of its sub-folders. You didn't give detailed steps to reproduce the problem in comment 0 so I just had to make some guesses. Feel free to provide concrete steps to reproduce the problem and then reopen this bug. Not to be overly cranky, but let me just summarize my user experience. Eclipse compiles files in xml.bak; I have no idea why. I've never added this folder to the source set. Judging by the error message (path name doesn't match class name), I realize that this is the problem. Therefore, I exclude the folder. Eclipse ignores this and the errors don't go away. Here's what I think should have happened. If you make a decision anticipating a user's wishes (such as automatically including folders the user didn't ask you to compile), and if that decision turns out to be flat-out wrong (xml.bak shouldn't have been compiled), and if the user then takes remedial action (excluding xml.bak from the source path), then you should be as eager in undoing your wrong decision (and remove the errors you mistakenly flagged!) as were in making this wrong decision in the first place. Alternatively, and much preferred, don't include folders the user didn't ask you to compile files from in the build. This reminds me of an earlier bug I filed where Eclipse insisted that .SourceFile.java.swp was "a needed resource" and the project couldn't be compiled unless it was present. >Eclipse compiles files in xml.bak;
Does it really compile them (i.e. generate .class files) or do you only think it because of the error you see on the folder?
If you exclude a folder it should not compile the files in it. If you have steps that show otherwise then simply provide them as I already said before.
|