CodeStyleSettingsToShow (LanguageCodeStyleSettingsProvider.SettingsType... types) { Ref<CodeStyleSettingsToShow> settingsToShow = new Ref<>(); CodeStyle.doWithTemporarySettings(myProject, CodeStyle.getSettings(myFile), tempSettings -> settingsToShow.set(computeFieldsWithTempSettings(tempSettings, types))); return settingsToShow.get(); }