I use Eclipse IDE and Window Builder Pro for create window. When I go to the source code I se开发者_开发百科e a big indent text. How to delete ?
How about good old Shift + Tab?
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
If you want to fix indent only you can select lines and press Ctrl-I. Take a look at Eclipse keys
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.
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.
精彩评论