}
List<CodeStyleFormattingOption> formattingOptions = codeStyleCustomSettings.getFormattingSettings().getOptions();
for (CodeStyleFormattingOption formattingOption : formattingOptions) {
CodeStylePreset preset = formattingOption.getPreset();
if (preset.accepts(rightBasePsiElement)) {
return preset.getSpacing(rightBasePsiElement, codeStyleSettings);
}
}
for (CodeStylePreset preset : CodeStyleDefaultPresets.PRESETS) {
if (preset.accepts(rightBasePsiElement)) {
return preset.getSpacing(rightBasePsiElement, codeStyleSettings);
}
}
}
return SpacingDefinition.ONE_SPACE.getValue();
}