Ejemplo n.º 1
0
        bool HandleImportKeyword(ITextEditor editor)
        {
            AbstractCompletionItemProvider provider = CreateKeywordCompletionItemProvider();

            ShowCodeCompletionWindow(provider, editor);
            return(true);
        }
Ejemplo n.º 2
0
        public void HandleKeyword_KeywordIsFrom_PythonCodeCompletionItemProviderPassedToShowCompletionWindow()
        {
            CreatePythonCodeCompletionBinding();
            codeCompletionBinding.HandleKeyword(fakeTextEditor, "from");

            AbstractCompletionItemProvider provider = codeCompletionBinding.CompletionItemProviderUsedWhenDisplayingCodeCompletionWindow;

            Assert.AreSame(codeCompletionBinding.KeywordCompletionItemProviderCreated, provider);
        }
Ejemplo n.º 3
0
 protected virtual void ShowCodeCompletionWindow(AbstractCompletionItemProvider completionItemProvider, ITextEditor editor)
 {
     completionItemProvider.ShowCompletion(editor);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Overrides the base class method so a code completion window is
 /// not displayed but the fact that this method is called is
 /// recorded.
 /// </summary>
 protected override void ShowCodeCompletionWindow(AbstractCompletionItemProvider completionItemProvider, ITextEditor textEditor)
 {
     TextEditorPassedToShowCompletionWindow = textEditor;
     IsCodeCompletionWindowDisplayed        = true;
     CompletionItemProviderUsedWhenDisplayingCodeCompletionWindow = completionItemProvider;
 }
Ejemplo n.º 5
0
 public void CallBaseShowCodeCompletionWindow(AbstractCompletionItemProvider completionItemProvider, ITextEditor textEditor)
 {
     base.ShowCodeCompletionWindow(completionItemProvider, textEditor);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Overrides the completion data provider creation to make sure
 /// it is called at the correct time.
 /// </summary>
 protected override AbstractCompletionItemProvider CreateKeywordCompletionItemProvider()
 {
     KeywordCompletionItemProviderCreated = base.CreateKeywordCompletionItemProvider();
     return(KeywordCompletionItemProviderCreated);
 }