Bug 261025 - [Viewers] Changing encoding in compare editor doesn't trigger structured differences recalculation
Summary: [Viewers] Changing encoding in compare editor doesn't trigger structured diff...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Pawel Pogorzelski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 261199 261321
  Show dependency tree
 
Reported: 2009-01-14 10:24 EST by Pawel Pogorzelski CLA
Modified: 2009-06-02 07:11 EDT (History)
2 users (show)

See Also:


Attachments
Patch_v01 (6.03 KB, patch)
2009-01-14 10:26 EST, Pawel Pogorzelski CLA
no flags Details | Diff
Patch_v02 (4.88 KB, patch)
2009-01-15 09:03 EST, Pawel Pogorzelski CLA
no flags Details | Diff
Patch_v03 (6.27 KB, patch)
2009-01-16 06:23 EST, Pawel Pogorzelski CLA
pawel.pogorzelski1: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Pogorzelski CLA 2009-01-14 10:24:10 EST
Build ID: N20090112-2000

Steps To Reproduce:
1. Open two UTF-8 java files in compare editor.
2. Change encoding in one pane to UTF-16.
3. Structured differences viewer is not updated.
Comment 1 Pawel Pogorzelski CLA 2009-01-14 10:26:36 EST
Created attachment 122539 [details]
Patch_v01
Comment 2 Pawel Pogorzelski CLA 2009-01-15 09:03:12 EST
Created attachment 122678 [details]
Patch_v02

I removed new API since there is no need to expose this functionality.
Comment 3 Szymon Brandys CLA 2009-01-16 06:12:06 EST
The fix looks good. I would update javadocs to be the same as in 3.4.x stream.
Comment 4 Pawel Pogorzelski CLA 2009-01-16 06:23:17 EST
Created attachment 122787 [details]
Patch_v03

Adding javadoc as Szymon suggested. Tom, could you have a look and release it?
Comment 5 Tomasz Zarna CLA 2009-01-16 08:57:08 EST
The last patch is in HEAD, I've got few comment though:
- filed bug 261347 as I'm not comfortable with the way Undo works for Set Encoding. It's bug against Platform/UI.
- recalculating the diffs it time consuming and we have to be careful when doing it on each encoding change. However, given the fact the action is not used as often as e.g. Save (see bug 176690) I guess we can get away with it.
- Pawel filed bug 261199 about finding a better way to notify StructureDiffViewer