Bug 282985 - Option for specifying the tab width for compare editor
Summary: Option for specifying the tab width for compare editor
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.4.1   Edit
Hardware: All All
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 259410
Blocks:
  Show dependency tree
 
Reported: 2009-07-09 05:02 EDT by Sebastian Zartner CLA
Modified: 2012-10-31 10:32 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.