Bug 194420 - Misleading error message when build fails due to out of sync workspace
Summary: Misleading error message when build fails due to out of sync workspace
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-26 10:10 EDT by John Arthorne CLA
Modified: 2007-08-03 11:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2007-06-26 10:10:10 EDT
Build ID: M20070212-1330 

1) Create a Java project
2) Turn off autobuild
3) Add some non-Java file to a source folder in the project. ("foo.txt")
4) In the file system (command line or windows explorer), delete "foo.txt"
5) Back in Eclipse, perform "Build Project"

You get this problem marker:

"The project was not built due to "Resource '/zzJohn/src/p1/foo.txt' does not exist.". Fix the problem, then try refreshing this project and building it since it may be inconsistent"

This error message is misleading. It first says "Fix the problem", which the user could interpret as "Add back the missing file". Of course this isn't necessary.  I suggest, in the case of an OUT_OF_SYNC_LOCAL exception, that you remove this "fix the problem" line and just say:

"The project was not built due to "Resource '/zzJohn/src/p1/foo.txt' does not exist.". The project state is inconsistent. Try refreshing this project and rebuilding it."

I have created this bug as a derivative of bug 194274 to save you from the hostile ranting.
Comment 1 Kent Johnson CLA 2007-06-26 10:43:15 EDT
Well that was very nice of you John.
Comment 2 Kent Johnson CLA 2007-06-27 15:48:52 EDT
Changes now catch the CoreException and refresh the resource to see if it still exists - if it doesn't, then we skip over it.

The force flag ensures that if the resource is just out of sync that the new contents on disk are copied, so we do not have to worry about this case.

Added CopyResourceTests testBug194420
Comment 3 Frederic Fusier CLA 2007-08-03 11:32:33 EDT
Verified for 3.4M1 using build I20070802-0800.