Esempio n. 1
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            var code           = GetHashCode();
            var formattingType = LanguageFeatureInfo.GetFormattingType(CodingLang);

            ConfigManager.AddEditorConfig(code, new Config {
                Language       = CodingLang,
                FormattingType = formattingType
            });

            HelpersPanel.SetUpMessaging();
            InputPanel.SetUpMessaging();
        }
Esempio n. 2
0
        public static IFoldingAlgorithm CreateAlgorithm(SupportedLanguages language)
        {
            var formattingType = LanguageFeatureInfo.GetFormattingType(language);

            switch (formattingType)
            {
            case FormattingType.BRACKETS:
                return(new BracketsFoldingAlgorithm());

            case FormattingType.MARKUP:
                return(new MarkupFoldingAlgorithm());

            case FormattingType.WHITESPACE:
                return(new WhitespaceFoldingAlgorithm());
            }

            throw new ArgumentException("Unsupported formatting type");
        }