Created
November 22, 2017 18:23
-
-
Save ionoy/137d707003b57bf978ba84e2b9b44d23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Export(typeof(IQuickInfoSourceProvider))] | |
[Name("Mouse processor")] | |
[ContentType(Strings.AmmyContentType)] | |
[TextViewRole(PredefinedTextViewRoles.Interactive)] | |
internal sealed class QuickInfoSourceProvider : IQuickInfoSourceProvider | |
{ | |
[Import] | |
SVsServiceProvider serviceProvider; | |
public IQuickInfoSource TryCreateQuickInfoSource(ITextBuffer textBuffer) | |
{ | |
ITextDocument textDocument; | |
textBuffer.Properties.TryGetProperty(typeof(ITextDocument), out textDocument); | |
Func<IQuickInfoSource> sc = delegate { return RuntimeLoader.GetObject<IQuickInfoSource>(textDocument.FilePath, t => t.Name == "QuickInfoSource", serviceProvider, textBuffer); }; | |
return textBuffer.Properties.GetOrCreateSingletonProperty(sc); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment