/// <summary>
        /// Initializes common settings.
        /// </summary>
        private void InitializeCommon(SourceAnalyzer analyzer, CodeDocument document)
        {
            m_names    = new Dictionary <string, string>();
            m_examples = new Dictionary <string, string>();
            m_regulars = new Dictionary <string, Regex>();

            string words = SettingsManager.GetValue <string>(
                analyzer,
                document.Settings,
                NamingSettings.Words);

            foreach (string setting in NamingSettings.GetCommon())
            {
                string name = SettingsManager.GetFriendlyName(analyzer, setting);
                m_names.Add(setting, name);

                string value = SettingsManager.GetValue <string>(analyzer, document.Settings, setting);
                if (String.IsNullOrEmpty(value))
                {
                    m_examples.Add(setting, null);
                    m_regulars.Add(setting, null);
                }
                else
                {
                    string example = NamingMacro.BuildExample(value);
                    m_examples.Add(setting, example);

                    Regex regex = NamingMacro.BuildRegex(value, words);
                    m_regulars.Add(setting, regex);
                }
            }
        }
        /// <summary>
        /// Gets preview text for specified setting value.
        /// </summary>
        public static string GetPreviewText(string settingName, string settingValue)
        {
            if (String.IsNullOrEmpty(settingValue))
            {
                return(Resources.DoNotCheck);
            }

            if (IsCommon(settingName))
            {
                return(NamingMacro.BuildExample(settingValue));
            }

            switch (settingName)
            {
            case BlockAt:
                return(new BlockAt().GetPreviewText(settingValue));

            case EnglishOnly:
                return(new EnglishOnly().GetPreviewText(settingValue));

            case CheckLength:
                return(new CheckLength().GetPreviewText(settingValue));

            default:
                return(settingValue);
            }
        }