@Nullable public static MTTheme valueOfIgnoreCase(@Nullable String name) { for (MTTheme theme : MTTheme.values()) { if (theme.name().equalsIgnoreCase(name)) { return theme; } } return null; }
@NotNull public static MTTheme getCurrentPreference() { String name = PropertiesComponent.getInstance().getValue(getSettingsPrefix() + ".theme"); MTTheme theme = MTTheme.valueOfIgnoreCase(name); return theme == null ? MTTheme.DEFAULT : theme; }