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

Bug 73648

Summary: [encoding] Dirty editor needs to react on encoding property changes
Product: [Eclipse Project] JDT Reporter: Kai-Uwe Maetzel <kai-uwe_maetzel>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P4 CC: b.muskalla, david_williams, deathemperor, kjdoyle, pawel.pogorzelski1, thatnitind
Version: 3.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Kai-Uwe Maetzel CLA 2004-09-10 05:51:24 EDT
Testing 3.0.1, also applicable to 3.1

Editors should react on encoding change events. Below a scenario that might 
easely confuse users as there is no obvious error. Closing and reopening the 
TestCase editor after having played the scenario then clearly shows the 
problem to the user.

0) Enable auto build
1) Open TestCase in Java editor
2) Change encoding of TestCase to UTF16 in properties dialog
-> compile errors show up in package explorer
3) Open TestResult
-> TestCase is underlined as error
4) Ctrl-Click on TestCase brings TestCase editor to front
-> everything looks fine, there is no obvious error
Comment 1 Dani Megert CLA 2004-09-10 10:49:08 EDT
Affected listeners:
- FileDocumentProvider$FileSynchronizer
- ResourceFileBuffer$FileSynchronizer
Comment 2 Dani Megert CLA 2004-10-04 11:37:24 EDT
This has been fixed for the case where the editor is not dirty. If the file is
dirty we currently ignore the encoding change.

Adapted summary.
Comment 3 Benjamin Muskalla CLA 2006-09-06 15:10:41 EDT
This problem still exists in Eclipse 3.3

Changing the encoding of an dirty editor does not cause a encoding change of the editor itself. Only closing the file and reopening the file does the encoding change. This is odd because you can't save an dirty editor without copying the content, closing and reopening the editor and pasting the canges.

As this is open for 2 years now, I think this could be fixed for the next release? Hm? :)
Comment 4 Dani Megert CLA 2006-09-07 02:11:01 EDT
>This problem still exists in Eclipse 3.3
Sure. FYI: Bug open ==> problem not fixed, please read https://bugs.eclipse.org/bugs/page.cgi?id=fields.html#status

>As this is open for 2 years now, I think this could be fixed for the next
>release? Hm? :)
Please provide a good quality patch if this is important to you or your product. We don't plan to work on this for 3.3.
Comment 5 Kevin Doyle CLA 2007-11-06 11:53:48 EST
*** Bug 203244 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Genie CLA 2019-07-15 15:39:15 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.

--
The automated Eclipse Genie.