private void startButton_Click(object sender, EventArgs e)
        {
            IComplementarable completion = SetCompletionType(algComboBox.SelectedIndex);

            if (completion != null)
            {
                Dictionary <string, int> vocabularyWords = GetTxtVocabularyWords();

                Dictionary <string, int> sourceWords = GetTxtSourceWords();

                CompletionManager completionManager = new CompletionManager(completion, sortCB.Checked, vocabularyWords);
                if (sourceWords != null)
                {
                    completionManager.Insert(sourceWords);
                }
                mainForm.Initialize(completionManager, (int)limitNum.Value);
                Close();
            }
            else
            {
                string databasePath = GetDbPath();
                if (databasePath != "")
                {
                    CompletionManager completionManager = new CompletionManager(new DatabaseCompletion(databasePath, vocabularyCB.Checked), sortCB.Checked, null);
                    mainForm.Initialize(completionManager, (int)limitNum.Value);
                    Close();
                }
            }
        }
        void InitializeEditor()
        {
            using (XmlReader reader = XmlReader.Create("Dsl.xshd"))
            {
                textEditor.SyntaxHighlighting = HighlightingLoader.Load(reader, HighlightingManager.Instance);
            }

            textEditor.KeyDown += textEditor_KeyDown;

            completionManager = new CompletionManager();
        }
Example #3
0
        public DocumentEntry(string content, Uri uri, IServiceContainer services)
        {
            _services = services;

            EditorBuffer = new EditorBuffer(content, "R");
            Document     = new REditorDocument(EditorBuffer, services, false);

            _completionManager    = new CompletionManager(services);
            _signatureManager     = new SignatureManager(services);
            _diagnosticsPublisher = new DiagnosticsPublisher(Document, uri, services);
            _formatter            = new CodeFormatter(_services);
            _symbolsProvider      = new DocumentSymbolsProvider();
        }
 public void Initialize(CompletionManager completionManager, int maxPrompts)
 {
     completion      = completionManager;
     this.maxPrompts = maxPrompts;
 }