eclipse-jdt / eclipse-jdt/eclipse.jdt.core

[Formatter] Formatting for methods when they contains a parameter with an annotation

Open
#4,117 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

Good morning, hope all is well over there!

I want to make sure this includes everything we'd need, so if i'm missing something let me know!

Example: https://github.com/tthornton3-chwy/eclipse-formatter-bug

```
import java.util.Optional;

public class Issue {

public void recreation(@Nullable final String auth) {
return;
}
}
```

is turning into:
```
...
public void recreation(@Nullable
final String auth) {
...
```

Instead of staying the same, or could also appropriate (although it's below 120, so probably shouldn't?), something like:
```
...
public void recreation(
@Nullable
final String auth) {
...
```

I don't think this is a configuration issue, because all of the settings look to be set to what i'd expect they should be, but i'll be happy to wear the dunce-cap if I missed something. I was using Eclipse's visual tool vs trying to do set any flags manually, so maybe there's a way to get what I want doing the latter?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.