[Java. Code Formatting] Make JD_KEEP_EMPTY_TRAILING_LINES private property in order to not to export it

IDEA-361836

GitOrigin-RevId: 6500f7532c8cd8b39feafea174fd6759a112da76
This commit is contained in:
Georgii Ustinov
2025-03-19 22:16:15 +03:00
committed by intellij-monorepo-bot
parent 6fdc7434a7
commit 0e32780e31
2 changed files with 7 additions and 4 deletions

View File

@@ -262,11 +262,11 @@ public class JavaCodeStyleSettings extends CustomCodeStyleSettings implements Im
@Property(externalName = "doc_keep_invalid_tags")
public boolean JD_KEEP_INVALID_TAGS = true;
/**
* This option is internal and not visible to the user.
* Note: this option is internal and not visible to the user.
*
* @see JavaCodeStyleSettings#shouldKeepEmptyTrailingLines()
*/
public boolean JD_KEEP_TRAILING_EMPTY_LINES = true;
private boolean myJdKeepTrailingEmptyLines = true;
@Property(externalName = "doc_keep_empty_lines")
public boolean JD_KEEP_EMPTY_LINES = true;
@Property(externalName = "doc_do_not_wrap_if_one_line")
@@ -294,7 +294,7 @@ public class JavaCodeStyleSettings extends CustomCodeStyleSettings implements Im
// endregion
public boolean shouldKeepEmptyTrailingLines() {
return JD_KEEP_TRAILING_EMPTY_LINES && JD_KEEP_EMPTY_LINES;
return myJdKeepTrailingEmptyLines && JD_KEEP_EMPTY_LINES;
}
@Override
@@ -403,6 +403,9 @@ public class JavaCodeStyleSettings extends CustomCodeStyleSettings implements Im
IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY);
}
public void setKeepTrailingEmptyLines(boolean JD_KEEP_TRAILING_EMPTY_LINES) {
this.myJdKeepTrailingEmptyLines = JD_KEEP_TRAILING_EMPTY_LINES;
}
@SuppressWarnings("unused") // Used in objectEquals.vm
public boolean isGenerateFinalLocals() {