[Java. Code Formatting] Add example to the line breaks formatting options for annotated and non-annotated fields

IDEA-110857

GitOrigin-RevId: 485c6712661e5857095f0e9f41906cd502b31115
This commit is contained in:
Georgii Ustinov
2024-07-16 12:18:33 +03:00
committed by intellij-monorepo-bot
parent 97951a964d
commit 6d4c154deb

View File

@@ -557,6 +557,8 @@ public final class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeSty
import javax.swing.*;
import java.util.Vector;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class Foo {
private int field1;
@@ -578,6 +580,21 @@ public final class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeSty
}
class AnotherClass {
}
public class ClassWithAnnotatedFields {
@Nullable
public static Boolean PUBLIC_STATIC_ANNOTATED_FIELD = null;
public static Boolean PUBLIC_STATIC_NON_ANNOTATED_FIELD = false;
public Boolean publicNonAnnotatedField = true;
@NotNull
public Boolean publicAnnotatedField = true;
@NotNull Boolean typeAnnotatedField = false;
@NotNull
private Boolean firstPrivateAnnotatedField = true;
@NotNull
private Boolean secondPrivateAnnotatedField = true;
}
interface TestInterface {
int MAX = 10;
int MIN = 1;