Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Problem with ICompletionSourceProvider

$
0
0

Hi, I've written new extension for Visual Studio which supports code completion for some language. Unfortunately it sometimes works, sometimes not. The problem is with ICompletionSourceProvider - this class has method TryCreateCompletionSource which should be enabled by Visual itself. I've used this tutorial: https://msdn.microsoft.com/pl-pl/library/ee372314%28v=vs.110%29.aspx . For sure CompletionHandler is working(checked by debugger) and only this SourceProvider does not react on anything. Do you have any idea why?

Here is code of source provider class:

[Export(typeof(ICompletionSourceProvider))]
[ContentType("cgshader")]
[Name("cg completion")]
internal class ShaderCompletionSourceProvider : ICompletionSourceProvider
{
    [Import]
    internal ITextStructureNavigatorSelectorService NavigatorService { get; set; }

    public ICompletionSource TryCreateCompletionSource(ITextBuffer textBuffer)
    {

//here some code which is not enabled - I've set breakpoints
    }
}



Viewing all articles
Browse latest Browse all 4410

Trending Articles