Hello. How to make (and is it even possible) that the code in Eclipse be formatted as in Notepade ++? There are if ... else conditions, methods like this:

@Override public void onCreate(Bundle savedInstanceState) { . super.onCreate(savedInstanceState); . setContentView(R.layout.main); . . . } 

Or

  if () { . . . }else{ . . . } 
  • For which programming language? Android? - anber

2 answers 2

For formatting, there is a keyboard shortcut Ctrl + Shift + F.

    In the code:

    1. Ctrl + A
    2. Ctrl + I

    PS To set the formatting:

    Windows -> Preferences, and then Java -> Code Style -> Formatter

    • And what kind of formatter? I have 3 by default and there is no such thing - Digetix
    • My default is Eclipse [built-in], if you press the Edit ... button, you can change almost any formatting settings. - sonniy
    • I tried through Windows -> Preferences, and then Java -> Code Style -> Formatter, but there are a lot of things that are not understandable - Digetix