LanguageCodeStyleSettingsProvider (Editor editor, PsiFile file) { Language language = PsiUtilBase.getLanguageInEditor(editor.getCaretModel().getCurrentCaret(), file.getProject()); return language != null ? guessSettingsProviderForLanguage(language) : null; }