Пример #1
0
        private CodeEditor CreateEditor(string filename, string filetype)
        {
            string     lexer = SupportedFiles.GetLexer(filetype);
            CodeEditor ce    = new CodeEditor(MOO_APPLICATION_SETTINGS.EditorConfig, filename);

            ce.SetLanguage(lexer);
            //get keywordlist from current project
            if (MOO_APPLICATION_SETTINGS.CurrentProject != null)
            {
                ce.UpadateCompletionList(MOO_APPLICATION_SETTINGS.CurrentProject.GetKeywords());
            }
            //add brunchs to editor list
            Dictionary <string, string> dic = MOO_BRUNCH_BROWSER.GetBrunchDictionary(filetype);

            ce.UpdateSnippets(dic);

            ce.CaretPositionChanged += new CaretPositionHandler(UpdateSatutsLineColumn);
            return(ce);
        }
Пример #2
0
        private CodeEditor CreateEditor(string filename,string filetype)
        {
            string lexer = SupportedFiles.GetLexer(filetype);
            CodeEditor ce = new CodeEditor(MOO_APPLICATION_SETTINGS.EditorConfig, filename);
            ce.SetLanguage(lexer);
            //get keywordlist from current project
            if (MOO_APPLICATION_SETTINGS.CurrentProject != null) {
                ce.UpadateCompletionList(MOO_APPLICATION_SETTINGS.CurrentProject.GetKeywords());
            }
            //add brunchs to editor list
            Dictionary<string,string> dic= MOO_BRUNCH_BROWSER.GetBrunchDictionary(filetype);
            ce.UpdateSnippets(dic);

            ce.CaretPositionChanged += new CaretPositionHandler(UpdateSatutsLineColumn);
            return ce;
        }