mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed IDEA-79849 Global code style settings tab size is always reset after IDEA restart
This commit is contained in:
@@ -154,6 +154,8 @@ public class CodeStyleSettings extends CommonCodeStyleSettings implements Clonea
|
||||
|
||||
public boolean USE_SAME_INDENTS = false;
|
||||
|
||||
public boolean IGNORE_SAME_INDENTS_FOR_LANGUAGES = false;
|
||||
|
||||
@Deprecated
|
||||
public final IndentOptions JAVA_INDENT_OPTIONS = new IndentOptions();
|
||||
@Deprecated
|
||||
@@ -611,6 +613,8 @@ public class CodeStyleSettings extends CommonCodeStyleSettings implements Clonea
|
||||
copyOldIndentOptions("jsp", JSP_INDENT_OPTIONS);
|
||||
copyOldIndentOptions("xml", XML_INDENT_OPTIONS);
|
||||
}
|
||||
|
||||
if (USE_SAME_INDENTS) IGNORE_SAME_INDENTS_FOR_LANGUAGES = true;
|
||||
}
|
||||
|
||||
private void copyOldIndentOptions(@NonNls final String extension, final IndentOptions options) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public class CommonCodeStyleSettings {
|
||||
myIndentOptions.copyFrom(fileTypeIdentOptions);
|
||||
rootSettings.unregisterAdditionalIndentOptions(myFileType);
|
||||
}
|
||||
else if (rootSettings.USE_SAME_INDENTS) {
|
||||
else if (rootSettings.USE_SAME_INDENTS && !rootSettings.IGNORE_SAME_INDENTS_FOR_LANGUAGES) {
|
||||
myIndentOptions.copyFrom(rootSettings.OTHER_INDENT_OPTIONS);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user