I use Eclipse IDE and Window Builder Pro for create window.
When I go to the source code I see a big indent text. How to delete ?

- 4,711
- 10
- 57
- 96
-
Maybe you should reduce indent to something like "2" in settings? – excanoe Jun 12 '11 at 17:02
-
Got to love GroupLayout. My recommendation is to ignore this section of code as it's not really supposed to be read by humans. If you want layout code that is readable, use a more human-friendly layout. – Hovercraft Full Of Eels Jun 12 '11 at 18:23
5 Answers
If by "how to delete" you mean to say that you want to decrease the indentation level, try this:
Go to
Window->Preferences->general->Editors->Text Editors
There specify the indentation level under :
Displayed Tab Width.
Additionally you can customize you formatting in Eclipse as :
Go to
Window->Preferences->Java->Code Style->Formatter
Select the formatter and press Edit
. Use whatever suits you.
Then Select the text you want to format and press Ctrl+Shift+F

- 13,055
- 19
- 60
- 93
If you want to fix indent only you can select lines and press Ctrl-I. Take a look at Eclipse keys

- 4,256
- 1
- 31
- 43
Most likely you insert tab character which is being expanded to 8 positions in target IDE.
Change setting in Eclipse to insert 4 spaces (or whatever your style is) when tab is pressed.
Then you can try to reformat your file in Eclipse. Also, you can use sed to replace \t
with 4 spaces.

- 24,429
- 7
- 52
- 49
If you like the way your formatter is set up for the rest of your code, perhaps telling the formatter not to work on this section would be desirable. Then you can unindent the section to make it visually appealing and not worry about it changing formatting.
Linked solution works in Eclipse 3.6.