public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            var textView = EditorAdaptersFactoryService.GetWpfTextView(textViewAdapter);

            var outliningManager = OutliningManagerService.GetOutliningManager(textView);

            if (!OptionsService.AdvancedOptions.EnterOutliningModeWhenFilesOpen)
            {
                outliningManager.Enabled = false;
            }

            textView.Properties.GetOrCreateSingletonProperty(() => new OutliningCommandTarget(textViewAdapter, textView, OutliningManagerService));
        }
Пример #2
0
 private void Create(params string[] lines)
 {
     _textView          = CreateTextView(lines);
     _textBuffer        = _textView.TextBuffer;
     _visualBuffer      = _textView.TextViewModel.VisualBuffer;
     _adhocOutliner     = AdhocOutlinerFactory.GetAdhocOutliner(_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;
 }