Bug 204472

Summary: [clean up] correct indentation for mixed tab/spaces
Product: [Eclipse Project] JDT Reporter: NoName <utilisateur_182>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: benno.baumgartner, daniel_megert
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description NoName CLA 2007-09-24 12:05:54 EDT
Build ID: I20070921-0919

Could you make the "Correct indentation" clean up to do nothing for lines where the indentation is "of good size" but is done with a mix of spaces and tabs when the formatter preferences say "mixed tab/space" ?
Comment 1 Dani Megert CLA 2007-09-25 03:49:44 EDT
You could use format clean up.
Comment 2 NoName CLA 2007-09-25 04:10:54 EDT
(In reply to comment #1)
> You could use format clean up.

Well format does a lot of changes to the source code, and i can't do that without being hated by my coworkers ;)
Comment 3 Dani Megert CLA 2007-09-25 04:13:49 EDT
>Well format does a lot of changes to the source code, and i can't do that
>without being hated by my coworkers ;)
We plan to add an option to only format changed regions.
Comment 4 Benno Baumgartner CLA 2007-09-25 04:17:22 EDT
(In reply to comment #0)
> Build ID: I20070921-0919
> 
> Could you make the "Correct indentation" clean up to do nothing for lines where
> the indentation is "of good size" but is done with a mix of spaces and tabs
> when the formatter preferences say "mixed tab/space" ?
> 

What is your use case? Do you want to reduce the amount of outgoing changes?
Would fixing bug 201063 help if that would also be available for correct
indentation?

Would you expect the same behavior for the correct indentation action?
Comment 5 NoName CLA 2007-09-25 08:39:31 EDT
(In reply to comment #4)
> What is your use case? Do you want to reduce the amount of outgoing changes?
> Would fixing bug 201063 help if that would also be available for correct
> indentation?
> 
> Would you expect the same behavior for the correct indentation action?

Here is a use case:
=================
public class Test {
    private int i; // a. old line added Smith, indent was done using 4 spaces
    private double d; // b. old line added by Doe, indent was done using 1 tab
private float f; // c. old line added by Smith, without indentation
                  private byte b; // d. old mis-indented line added by Doe

public String s; // e. i have just added a mis-indented line before saving

}
=================

When i save, i would expect that the lines (a and b) remains the same, and the lines (c, d and e) are corrected.

From what i understand, fixing the bug 201063 would not help.