Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326401 - [clean up] save action fails on saving changes in Java editor when the same file is open in CVS compare editor
Summary: [clean up] save action fails on saving changes in Java editor when the same f...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 07:40 EDT by Ayushman Jain CLA
Modified: 2019-10-21 12:13 EDT (History)
2 users (show)

See Also:


Attachments
screenshot of error dialog (84.64 KB, image/jpeg)
2010-09-28 07:40 EDT, Ayushman Jain CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ayushman Jain CLA 2010-09-28 07:40:38 EDT
Created attachment 179727 [details]
screenshot of error dialog

Build id: I20100922-0800.

Not sure if this is a UI issue.

I get an error dialog saying "the file has been saved but one of the save actions failed" on following the steps given below:

1. Enable save actions in Preferences>Java>Editor. I have the following save actions enabled: 
  a. Organise imports
  b. Additional actions:
     b1. Add final modifier to private field.
     b2. Remove unused imports
     b3. Remove unnecessary cast

2. Open a java file in the java editor as well as the CVS compare view. Make some changes in the compare view, then go back to the java editor, and make some changes. Then save while still in the java editor.
3. Eclipse warns that a resource has changed out of the compare view and if you're sure you want to save. Click on save.
4. Observe an error dialog appears, as in the attached screenshot. There's nothing in the error log.

I never got this error before this build.
Comment 1 Ayushman Jain CLA 2010-09-28 07:43:11 EDT
(In reply to comment #0)
>[..]

Got this on org.eclipse.jdt.core.tests.compiler.regression.BatchCompilerTest. I couldn't reproduce anywhere else yet.
Comment 2 Dani Megert CLA 2010-09-28 08:24:37 EDT
This can happen if two editors are open on the same file with different model and then the clean up kicks in.
Comment 3 Eclipse Genie CLA 2019-01-04 20:19:18 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.

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.

--
The automated Eclipse Genie.
Comment 4 Garret Wilson CLA 2019-10-21 12:13:40 EDT
I'm frequently getting this error in Eclipse 2019.09 (4.13.0), Enterprise package, on Windows 10. This usually happens when Eclipse decides it needs to rebuild half my project just because I changed a line or two in a single file, described in Bug 547648, and I try to save the current file while Eclipse is busy doing this new build it decided it needed to do.