2

Say you have fluent method chains with meaningful indentations like:

    http
        .authorizeRequests()
            .antMatchers("/", "/home").permitAll()
            .anyRequest().authenticated()
            .and()
        .formLogin()
            .loginPage("/login")
            .permitAll()
            .and()
        .logout()
            .permitAll();

Auto formatting in Eclipse creates the following, if you have "Never join already wrapped lines" active:

    http
            .authorizeRequests()
            .antMatchers("/", "/home").permitAll()
            .anyRequest().authenticated()
            .and()
            .formLogin()
            .loginPage("/login")
            .permitAll()
            .and()
            .logout()
            .permitAll();

Because of that you are forced to decide between autoformatting a file containing fluent code and losing the meaningful indention hierarchy or giving up on automatic formatting...

I'd need the option "don't change relative indentation for chained method calls".

Is there a solution for this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
ASA
  • 1,911
  • 3
  • 20
  • 37

0 Answers0