Skip to content

Wrong indentation in IntelliJ IDEA #35

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
snicoll opened this issue Jun 6, 2018 · 1 comment
Closed

Wrong indentation in IntelliJ IDEA #35

snicoll opened this issue Jun 6, 2018 · 1 comment

Comments

@snicoll
Copy link
Contributor

snicoll commented Jun 6, 2018

When the plugin is active in IntelliJ IDEA, some live formatting are not working the same way as when the code is formatted.

Examples:

In builder style, the line will be too long so a new line should indent the code

Original code:

RestTemplate restTemplate = new RestTemplateBuilder().requestFactory(SimpleClientHttpRequestFactory::new).build();

If I invoke carriage return after the constructor (wrong):

RestTemplate restTemplate = new RestTemplateBuilder()
.requestFactory(SimpleClientHttpRequestFactory::new).build();

If I invoke the formatter manually (code reformat action in IJ) (correct):

RestTemplate restTemplate = new RestTemplateBuilder()
		.requestFactory(SimpleClientHttpRequestFactory::new).build();

A similar, yet slightly different, behaviour occurs with Javadoc

Original code:

/**
 * @author Stephane Nicoll
 */
public class Sample {
}

If the cursor is at the end of the first line (/**) and I invoke a carriage return, I get the following (wrong):

/**
* 
 * @author Stephane Nicoll
 */
public class Sample {
}

Again, invoking code reformat fixes it.

@philwebb
Copy link
Contributor

philwebb commented Jun 6, 2018

Possibly related to #33

@philwebb philwebb added this to the 0.0.6 milestone Jul 8, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants