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

Bug 35355

Summary: [Operations] Replace with latest from HEAD yields confusing error message if not refreshed again.
Product: [Eclipse Project] Platform Reporter: Andreas Krüger <andreas.krueger>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: nboldt
Version: 2.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard: stalebug

Description Andreas Krüger CLA 2003-03-20 07:55:34 EST
This software that I help develop will sometimes write to resources
that are in a Eclipse Java project.  Sometimes I like those writes, sometimes
I don't.

When I don't like them, I use "Replace with latest from HEAD".


In that process, I get an error message that's rather confusing:

"Problem deleting resource:
(filename) Problems encountered while deleting resources."
What actually happened: That file was changed outside of Eclipse,
I had refreshed it (so Eclipse knew it to be changed),
I had again changed it outside of Eclipse,
I had *not* refreshed it again this time,
and then I did "replace with latest from HEAD".

By now, I know what that error message means.  Simply one more refresh,
and all is well.

The first time I saw it, however, I went hunting for any programms
that might have an open file descriptor on that file
(there were no such programms).
From this experience, I ask:
Please handle this problem more gracefully.
Comment 1 Jason Yip CLA 2003-11-20 18:59:00 EST
I would suggest being able to configure Eclipse to refresh automatically before 
a synch.
Comment 2 Andreas Krüger CLA 2003-11-21 04:12:10 EST
That's a good suggestion!

But it would not help to avoid the problem described in this particular bug.

Certainly not if that configuration option happens to not be activated -
and we want eclipse to work well in that case, too, don't we?

All I've been asking for is a more specific error message.
Comment 3 Jean-Michel Lemieux CLA 2004-06-11 16:51:20 EDT
Post 3.0
Comment 4 Michael Valenta CLA 2006-06-14 09:20:34 EDT
Eclipse can now be configured to aitomatically keep in sync with the filesystem (General>Workspace>Refresh Automatically)
Comment 5 Andreas Krüger CLA 2006-06-19 03:03:25 EDT
Dear Michael,

this bug reports "the wording of the error message is confusing".

You say: "There is this configuration option - if you set it, the bug will not show."

Does that solve the bug?

Appearently, the Eclipse team thinks, that configuration option is not a good choice for everybody. ( I agree.) So it can be left unset.

Obviously, the error message can still happen, if the configuration option is left unset.

As far as I can tell, the wording is still confusing in that case.

A bug is not fixed simply because it does not happen under some circumstances.

Change the error message to something like "out of sync with file system" or so. Or even "possible reason: out of sync with file system".
Comment 6 Michael Valenta CLA 2006-06-19 09:25:08 EDT
Point taken. we will try and improve the error message for 3.3.
Comment 7 Michael Valenta CLA 2006-09-14 10:21:51 EDT
We do not plan on addressing this issue in 3.3. Patches will be accepted.
Comment 8 Michael Valenta CLA 2006-09-27 18:39:27 EDT
*** Bug 157940 has been marked as a duplicate of this bug. ***
Comment 9 Nick Boldt CLA 2006-09-27 21:37:36 EDT
(In reply to comment #4)
> Eclipse can now be configured to aitomatically keep in sync with the filesystem
> (General>Workspace>Refresh Automatically)
> 

This may be true, but sometimes it's really slow to auto-update - and the confusing error message will appear again.

This seems like a trivial thing to fix: isn't this just a matter of changing a properties file to use a diffferent, less obscure message?
Comment 10 Michael Valenta CLA 2006-09-28 09:28:58 EDT
It's not a simple as that since the message being displayed is from a lower level component so we would need to catch the exception, detect that it is a local sync problem and add another message. Also interesting is the fact that there should be additional details indicating why the delete failed but they do not appear to be available in the screenshot that was provided. But, as you say, it should not be that difficult to fix. However, we have much more work than we have hands so I don't see us being able to find the time to fix this in 3.3. Patches are welcome if you want to take a crack at it.
Comment 11 Nick Boldt CLA 2006-09-28 20:27:16 EDT
I understand the more work than hands situation - we're all in that boat. If you can point me to where the offending code is, I can maybe take a look at writing a patch for you. Where's the code that handles this stuff? org.eclipse.team.something, I presume?
Comment 12 Michael Valenta CLA 2006-09-29 09:04:58 EDT
The best place to start would be the ReplaceOperation in the org.eclipse.team.cvs.ui plugin.
Comment 13 Eclipse Webmaster CLA 2019-09-06 16:04:09 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 14 Eclipse Genie CLA 2021-11-14 18:26:26 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.