コード例 #1
0
        public GotoBraceCommand(ITextView textView, ITextBuffer textBuffer) :
            base(textView, _commands, false) {
            var importComposer = new ContentTypeImportComposer<IBraceMatcherProvider>(EditorShell.Current.CompositionService);
            _braceMatcherProvider = importComposer.GetImport(textBuffer.ContentType.TypeName);

            TextBuffer = textBuffer;
        }
コード例 #2
0
        public GotoBraceCommand(ITextView textView, ITextBuffer textBuffer, IServiceContainer services) :
            base(textView, _commands, false)
        {
            var locator = services.GetService <IContentTypeServiceLocator>();

            _braceMatcherProvider = locator.GetService <IBraceMatcherProvider>(textBuffer.ContentType.TypeName);
            TextBuffer            = textBuffer;
        }
コード例 #3
0
ファイル: GotoBraceCommand.cs プロジェクト: xoriath/RTVS
        public GotoBraceCommand(ITextView textView, ITextBuffer textBuffer) :
            base(textView, _commands, false)
        {
            var importComposer = new ContentTypeImportComposer <IBraceMatcherProvider>(EditorShell.Current.CompositionService);

            _braceMatcherProvider = importComposer.GetImport(textBuffer.ContentType.TypeName);

            TextBuffer = textBuffer;
        }
コード例 #4
0
ファイル: GotoBraceCommand.cs プロジェクト: jingmouren/RTVS
        public GotoBraceCommand(ITextView textView, ITextBuffer textBuffer, ICoreShell shell) :
            base(textView, _commands, false)
        {
            var importComposer = new ContentTypeImportComposer <IBraceMatcherProvider>(shell.GetService <ICompositionService>());

            _braceMatcherProvider = importComposer.GetImport(textBuffer.ContentType.TypeName);

            TextBuffer = textBuffer;
        }