refactoring, simplification

This commit is contained in:
Yaroslav Lepenkin
2017-09-05 12:21:30 +03:00
parent 01f34755dc
commit fb90931349
@@ -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;
}