Community
Participate
Working Groups
Build Identifier: I20090611-1540 After editing a file and attempting to save a dialog popped up "Save Problems": "Save could not be completed. Reason: Operation not supported for specified element..". I'm not sure if this is a core eclipse problem or JDT. In any case a bug in any plugin should never prevent a save. Please see attached screenshot. Workaround: Select all, paste elsewhere, close the editor discarding changes, reopen the editor and paste. Now the editor saves correctly. Reproducible: Couldn't Reproduce
Created attachment 182498 [details] Screenshot of the problem
JDT Core throws this message. JDT Core, please investigate.
Some other details: - other files could be saved at that time—it was just this file that I couldn’t save. - It had happened just after I introduced some compile error into the file.
We clearly need more information to investigate. What operation was run ? Without steps, there is nothing we can do.
(In reply to comment #4) > We clearly need more information to investigate. > What operation was run ? Attempted to save the dirty editor > Without steps, there is nothing we can do. Not reproducible. I can provide configuration dump. In any case the logic should be evaluated: a bug/exception thrown by JDT should not prevent a save.
We need at least the stack trace that led to this dialog.
(In reply to comment #6) > We need at least the stack trace that led to this dialog. There was nothing in the error log
(In reply to comment #5) > Not reproducible. I can provide configuration dump. In any case the logic > should be evaluated: a bug/exception thrown by JDT should not prevent a save. Right, but to investigate I need to reproduce what happened. I don't even know what operation failed.
(In reply to comment #8) > (In reply to comment #5) > > Not reproducible. I can provide configuration dump. In any case the logic > > should be evaluated: a bug/exception thrown by JDT should not prevent a save. > Right, but to investigate I need to reproduce what happened. I don't even know > what operation failed. Ok. Feel free to close then. This can be documentation in case this issue comes up in the future. Otherwise forward to core Eclipse: Eclipse should not let a bug in a plugin prevent a save.
Created attachment 207211 [details] Erros message screenshot I can reproduce this bug: 1. I open external SameName.java file ("File" -> "Open file..."), which is originally UTF-8, but eclipse wrongly converted it to default encoding CP-1252 -> skandinavian special alphabetic characters looks therefore very ugly, like this: näyttö (there should be: näyttö). Therefore I call this file "ugly looking" SameName.java 2. Then I copy-paste two text row (which includes only american letters) from "ugly looking" SameName.java to my other, "nice looking" SameName.java file (which came from CVS import and which name is SameName.java too, but it shows skandinavian alphabets correctly). 3. Then I try to save my "nice looking" SameName.java (which came from cvs) and then I get: "Save could not be completed. Reason: Operation not supported for specified element type(s):SameName.java[in <default> [in (package path is here)[in (project name is here)]]]"
My eclipse is: Version: Helios Service Release 2 Build id: 20110218-0911
(In reply to comment #10) > Created attachment 207211 [details] > Erros message screenshot > > I can reproduce this bug: I can't reproduce this on HEAD or 3.8 M3. Only difference is, I didn't use CVS and I used eclipse to create the UTF-8 encoded file as well as the other one with Cp1252 encoding. And I had both files open in eclipse and copied from one editor to another. Hope this is in line with your steps. Anything in the logs this time?
There was nothing (new) texts in "Console" window after errow window appeared. I did: "Help" -> "Check for updates" (waiting...)-> "Select components for update" (or something like that) -> "You must restart your eclipse" And now I still have: Version: Helios Service Release 2 Build id: 20110218-0911 But I am sure that eclipse did several updates, but did not raise version number. I can find some minor updates here: >cd D:\eclipse\configuration\org.eclipse.update\history >dir 05.05.2011 08:34 29 968 1304577269528.xml 18.11.2011 13:45 29 718 1321616750447.xml >diff 1304577269528.xml 1321616750447.xml |wc 528 1704 57902 Anyway, I cant produce this bug anymore after updating my eclipse, so for me this bug is now "Resolved Fixed" ! Thank you for making new eclipse versions! :-)
Marking as resolved.
I was just looking at this when I saw it is already marked VERIFIED. Anyway, here's my 2c: Original reporter gave very few details, so we had no chance to actually reproduce. Still we could guess a *little* more from the report: The message corresponds to a Status with detail IJavaModelStatusConstants.INVALID_ELEMENT_TYPES. I would guess that this was likely raised in org.eclipse.jdt.internal.core.CommitWorkingCopyOperation.verify() which *would* mean an attempt was made to commit a non-workingcopy CU. Would this happen, when trying to save a non-dirty buffer? Anyway, we won't get much closer without a stacktrace or s.t. like it. As to the second reporter: (In reply to comment #13) > There was nothing (new) texts in "Console" window after errow window appeared. We should have explicitly asked to open the "Error Log" view instead of looking at some console (which? Eclipse Console? Windows Console?). Finally, with > Anyway, I cant produce this bug anymore after updating my eclipse, so for me > this bug is now "Resolved Fixed" ! I agree with the resolution of this bug.