Bug 282985

Summary: Option for specifying the tab width for compare editor
Product: [Eclipse Project] Platform Reporter: Sebastian Zartner <sebastianzartner>
Component: CompareAssignee: Platform-Compare-Inbox <platform-compare-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: groar, mauromol, pawel.pogorzelski1, Szymon.Brandys
Version: 3.4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 259410    
Bug Blocks:    

Description Sebastian Zartner CLA 2009-07-09 05:02:44 EDT
Build ID: M20080911-1700

For text editors there's an option for specifying the "Displayed tab width". This option is currently missing for the compare editor.
Therefore a text field in the preferences under General->Compare/Patch would be the best way to control this.
Comment 1 Mauro Molinari CLA 2012-10-24 11:30:44 EDT
This is especially important when you are using formatter options with a different tab width.

I mean, right now I'm using Java built-in conventions for the formatter and this is using a tab width of 8.
When comparing files with the compare editor, I see it using a display tab width of just 2: the result is wrongly indented code shown in the compare editor.

I tried to change the displayed tab width in Window | Preferences | General | Editors | Text Editors, but it seems like it doesn't have effect on the compare editor.

Is there a workaround for this?
Comment 2 Szymon Brandys CLA 2012-10-31 10:27:22 EDT
(In reply to comment #1) 
> I tried to change the displayed tab width in Window | Preferences | General
> | Editors | Text Editors, but it seems like it doesn't have effect on the
> compare editor.
> 
> Is there a workaround for this?

The general text editor pref works for compare editors too. However to see the change in the compare editor you need to reopen it. I think you can consider it as a workaround.

I'm on one of 4.3 IBuilds.
Comment 3 Mauro Molinari CLA 2012-10-31 10:32:04 EDT
I did close and reopen the compare editor and also restarted Eclipse, but it had no effect. We have been forced to change our formatter policy to "spaces only" because of this problem :-(
Comment 4 Mauro Molinari CLA 2012-10-31 10:32:41 EDT
Please note I was using Eclipse 4.2.1, I don't know if something has changed in 4.3.