mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 19:02:13 +07:00
refactoring, simplification
This commit is contained in:
@@ -43,18 +43,19 @@ public class BlockIndentOptions {
|
||||
|
||||
@NotNull
|
||||
public CommonCodeStyleSettings.IndentOptions getIndentOptions(@NotNull AbstractBlockWrapper block) {
|
||||
if (!myIndentOptions.isOverrideLanguageOptions()) {
|
||||
final Language language = block.getLanguage();
|
||||
if (language != null) {
|
||||
final CommonCodeStyleSettings commonSettings = mySettings.getCommonSettings(language);
|
||||
if (commonSettings != null) {
|
||||
final CommonCodeStyleSettings.IndentOptions result = commonSettings.getIndentOptions();
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
if (myIndentOptions.isOverrideLanguageOptions()) return myIndentOptions;
|
||||
|
||||
final Language language = block.getLanguage();
|
||||
if (language != null) {
|
||||
final CommonCodeStyleSettings commonSettings = mySettings.getCommonSettings(language);
|
||||
if (commonSettings != null) {
|
||||
final CommonCodeStyleSettings.IndentOptions result = commonSettings.getIndentOptions();
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return myIndentOptions;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user