Beispiel #1
0
 ITagger <T> IViewTaggerProvider.CreateTagger <T>(ITextView textView, ITextBuffer textBuffer)
 {
     return(EditorUtilsFactory.CreateTagger(
                textView.Properties,
                _key,
                () => CreateCharDisplayTaggerSource(textView)) as ITagger <T>);
 }
        IClassifier IClassifierProvider.GetClassifier(ITextBuffer textBuffer)
        {
            var classificationType = _classificationTypeRegistryService.GetClassificationType(DirectoryFormatDefinition.Name);

            return(EditorUtilsFactory.CreateClassifier(
                       textBuffer.Properties,
                       Key,
                       () => new DirectoryTaggerSource(textBuffer, classificationType)));
        }
Beispiel #3
0
            public BasicTest()
            {
                _textBuffer = CreateTextBuffer();

                var classificationType = EditorHost.ClassificationTypeRegistryService.GetOrCreateClassificationType("classifier test");

                _source     = new TextBasicTaggerSource <IClassificationTag>(new ClassificationTag(classificationType));
                _classifier = EditorUtilsFactory.CreateClassifierRaw(_source);
            }
Beispiel #4
0
        ITagger <T> IViewTaggerProvider.CreateTagger <T>(ITextView textView, ITextBuffer textBuffer)
        {
            if (textView.TextBuffer != textBuffer || !_vim.ShouldCreateVimBuffer(textView))
            {
                return(null);
            }

            return(EditorUtilsFactory.CreateTagger(
                       textView.Properties,
                       _key,
                       () => CreateCharDisplayTaggerSource(textView)) as ITagger <T>);
        }
        ITagger <T> IViewTaggerProvider.CreateTagger <T>(ITextView textView, ITextBuffer textBuffer)
        {
            if (textView.TextBuffer != textBuffer)
            {
                return(null);
            }

            var tagger = EditorUtilsFactory.CreateTagger(
                textView.Properties,
                _key,
                () => new WordUnderCaretTagger(textView));

            return((ITagger <T>)(object) tagger);
        }
Beispiel #6
0
 private void Create(params string[] lines)
 {
     _textView          = CreateTextView(lines);
     _textBuffer        = _textView.TextBuffer;
     _visualBuffer      = _textView.TextViewModel.VisualBuffer;
     _adhocOutliner     = EditorUtilsFactory.GetOrCreateOutliner(_textView.TextBuffer);
     _outliningeManager = OutliningManagerService.GetOutliningManager(_textView);
     _statusUtil        = new Mock <IStatusUtil>(MockBehavior.Strict);
     _foldData          = FoldManagerFactory.GetFoldData(_textView.TextBuffer);
     _foldManagerRaw    = new FoldManager(
         _textView,
         _foldData,
         _statusUtil.Object,
         FSharpOption.Create(OutliningManagerService.GetOutliningManager(_textView)));
     _foldManager = _foldManagerRaw;
 }
        public IClassifier GetClassifier(ITextBuffer textBuffer)
        {
            var classificationType = _classificationTypeRegistryService.GetClassificationType(DogClassificationFormatDefinition.Name);

            return(EditorUtilsFactory.CreateClassifierRaw(new DogClassifier(classificationType)));
        }
        ITagger <T> ITaggerProvider.CreateTagger <T>(ITextBuffer textBuffer)
        {
            var tagger = EditorUtilsFactory.CreateOutlinerTagger(textBuffer);

            return((ITagger <T>)(object) tagger);
        }
Beispiel #9
0
 internal VimProtectedOperations([ImportMany] IEnumerable <Lazy <IExtensionErrorHandler> > errorHandlers)
 {
     _protectedOperations = EditorUtilsFactory.CreateProtectedOperations(errorHandlers);
 }