PredefinedCodeStyle[] () { final Language language = getDefaultLanguage(); if (language == null) return PredefinedCodeStyle.EMPTY_ARRAY; PredefinedCodeStyle[] predefinedStyles = PredefinedCodeStyle.EP_NAME.getExtensions(); PredefinedCodeStyle[] styles = stream(predefinedStyles) .filter(s -> s.isApplicableToLanguage(language)) .toArray(n -> new PredefinedCodeStyle[n]); if (styles.length >= 2 && ContainerUtil.exists(styles, s -> s instanceof Weighted)) { Arrays.sort(styles, WEIGHTED_COMPARATOR); } return styles; }