I'm using the Eclipse built-in formatter. Let's say I have the following method:
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/", "/home").authenticated()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.permitAll()
.and()
.logout()
.logoutSuccessUrl("/login?logout")
.permitAll();
}
When I try to format my class (Ctrl+Shift+F), it become like this:
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("/", "/home").authenticated().anyRequest().authenticated().and()
.formLogin().loginPage("/login").permitAll().and().logout().logoutSuccessUrl("/login?logout")
.permitAll();
}
How can I keep the original formatting of how I split the china of method calls and still be able to format other parts of the code?