public StreamingFindReferencesPresenter(
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners)
        {
            _serviceProvider = serviceProvider;
            _textBufferFactoryService = textBufferFactoryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _contentTypeRegistryService = contentTypeRegistryService;

            _textEditorFactoryService = textEditorFactoryService;
            _typeMap = typeMap;
            _formatMapService = formatMapService;

            _asyncListener = new AggregateAsynchronousOperationListener(
                asyncListeners, FeatureAttribute.ReferenceHighlighting);

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
 public RemoteHostClientServiceFactory(
     IDiagnosticAnalyzerService analyzerService,
     IEditorOptionsFactoryService editorOptionService)
 {
     _analyzerService     = analyzerService;
     _editorOptionService = editorOptionService;
 }
Exemplo n.º 3
0
 public HostFactory(
     IVim vim,
     ITextBufferFactoryService bufferFactoryService,
     ITextEditorFactoryService editorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IKeyBindingService keyBindingService,
     SVsServiceProvider serviceProvider,
     IVsEditorAdaptersFactoryService adaptersFactory,
     IExternalEditorManager externalEditorManager,
     IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
     IVsAdapter adapter,
     IProtectedOperations protectedOperations,
     IVimBufferCoordinatorFactory bufferCoordinatorFactory)
 {
     _vim = vim;
     _keyBindingService                 = keyBindingService;
     _bufferFactoryService              = bufferFactoryService;
     _editorFactoryService              = editorFactoryService;
     _editorOptionsFactoryService       = editorOptionsFactoryService;
     _externalEditorManager             = externalEditorManager;
     _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
     _adaptersFactory          = adaptersFactory;
     _adapter                  = adapter;
     _protectedOperations      = protectedOperations;
     _bufferCoordinatorFactory = bufferCoordinatorFactory;
 }
        public StreamingFindReferencesPresenter(
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners)
        {
            _serviceProvider                = serviceProvider;
            _textBufferFactoryService       = textBufferFactoryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService    = editorOptionsFactoryService;
            _contentTypeRegistryService     = contentTypeRegistryService;

            _textEditorFactoryService = textEditorFactoryService;
            _typeMap          = typeMap;
            _formatMapService = formatMapService;

            _asyncListener = new AggregateAsynchronousOperationListener(
                asyncListeners, FeatureAttribute.ReferenceHighlighting);

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
Exemplo n.º 5
0
 public PreviewFactoryService(
     IThreadingContext threadingContext,
     ITextBufferFactoryService textBufferFactoryService,
     IContentTypeRegistryService contentTypeRegistryService,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     ICocoaTextEditorFactoryService textEditorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextDifferencingSelectorService differenceSelectorService,
     IDifferenceBufferFactoryService differenceBufferService,
     ICocoaDifferenceViewerFactoryService differenceViewerService
     )
     : base(
         threadingContext,
         textBufferFactoryService,
         contentTypeRegistryService,
         projectionBufferFactoryService,
         editorOptionsFactoryService,
         differenceSelectorService,
         differenceBufferService,
         textEditorFactoryService.CreateTextViewRoleSet(
             TextViewRoles.PreviewRole,
             PredefinedTextViewRoles.Analyzable
             )
         )
 {
     _differenceViewerService = differenceViewerService;
 }
Exemplo n.º 6
0
 TextEditorFactoryService(ITextBufferFactoryService textBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ICommandService commandService, ISmartIndentationService smartIndentationService, [ImportMany] IEnumerable <Lazy <IWpfTextViewCreationListener, IDeferrableContentTypeAndTextViewRoleMetadata> > wpfTextViewCreationListeners, [ImportMany] IEnumerable <Lazy <ITextViewCreationListener, IDeferrableContentTypeAndTextViewRoleMetadata> > textViewCreationListeners, IFormattedTextSourceFactoryService formattedTextSourceFactoryService, IViewClassifierAggregatorService viewClassifierAggregatorService, ITextAndAdornmentSequencerFactoryService textAndAdornmentSequencerFactoryService, IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService, IAdornmentLayerDefinitionService adornmentLayerDefinitionService, ILineTransformProviderService lineTransformProviderService, IWpfTextViewMarginProviderCollectionProvider wpfTextViewMarginProviderCollectionProvider, IMenuService menuService, IEditorOperationsFactoryService editorOperationsFactoryService, ISpaceReservationStackProvider spaceReservationStackProvider, IWpfTextViewConnectionListenerServiceProvider wpfTextViewConnectionListenerServiceProvider, IBufferGraphFactoryService bufferGraphFactoryService, [ImportMany] IEnumerable <Lazy <ITextViewModelProvider, IContentTypeAndTextViewRoleMetadata> > textViewModelProviders, IContentTypeRegistryService contentTypeRegistryService, IThemeService themeService, Lazy <ITextViewUndoManagerProvider> textViewUndoManagerProvider)
 {
     this.textBufferFactoryService    = textBufferFactoryService;
     this.editorOptionsFactoryService = editorOptionsFactoryService;
     this.commandService                              = commandService;
     this.smartIndentationService                     = smartIndentationService;
     this.wpfTextViewCreationListeners                = wpfTextViewCreationListeners.ToArray();
     this.textViewCreationListeners                   = textViewCreationListeners.ToArray();
     this.formattedTextSourceFactoryService           = formattedTextSourceFactoryService;
     this.viewClassifierAggregatorService             = viewClassifierAggregatorService;
     this.textAndAdornmentSequencerFactoryService     = textAndAdornmentSequencerFactoryService;
     this.classificationFormatMapService              = classificationFormatMapService;
     this.editorFormatMapService                      = editorFormatMapService;
     this.adornmentLayerDefinitionService             = adornmentLayerDefinitionService;
     this.lineTransformProviderService                = lineTransformProviderService;
     this.wpfTextViewMarginProviderCollectionProvider = wpfTextViewMarginProviderCollectionProvider;
     this.menuService = menuService;
     this.editorOperationsFactoryService = editorOperationsFactoryService;
     this.spaceReservationStackProvider  = spaceReservationStackProvider;
     this.wpfTextViewConnectionListenerServiceProvider = wpfTextViewConnectionListenerServiceProvider;
     this.bufferGraphFactoryService  = bufferGraphFactoryService;
     this.textViewModelProviders     = textViewModelProviders.ToArray();
     this.contentTypeRegistryService = contentTypeRegistryService;
     this.themeService = themeService;
     this.textViewUndoManagerProvider = textViewUndoManagerProvider;
 }
Exemplo n.º 7
0
 public CSharpCodeModelServiceFactory(
     IEditorOptionsFactoryService editorOptionsFactoryService,
     [ImportMany] IEnumerable <IRefactorNotifyService> refactorNotifyServices)
 {
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _refactorNotifyServices      = refactorNotifyServices;
 }
Exemplo n.º 8
0
 public HostFactory(
     IVim vim,
     ITextBufferFactoryService bufferFactoryService,
     ITextEditorFactoryService editorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IKeyBindingService keyBindingService,
     SVsServiceProvider serviceProvider,
     IVsEditorAdaptersFactoryService adaptersFactory,
     IExternalEditorManager externalEditorManager,
     IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
     IVsAdapter adapter,
     IProtectedOperations protectedOperations,
     IVimBufferCoordinatorFactory bufferCoordinatorFactory)
 {
     _vim = vim;
     _keyBindingService = keyBindingService;
     _bufferFactoryService = bufferFactoryService;
     _editorFactoryService = editorFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _externalEditorManager = externalEditorManager;
     _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
     _adaptersFactory = adaptersFactory;
     _adapter = adapter;
     _protectedOperations = protectedOperations;
     _bufferCoordinatorFactory = bufferCoordinatorFactory;
 }
Exemplo n.º 9
0
        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            IVsAdapter adapter,
            [EditorUtilsImport] IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil)
        {
            _vim = vim;
            _keyBindingService           = keyBindingService;
            _bufferFactoryService        = bufferFactoryService;
            _editorFactoryService        = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory          = adaptersFactory;
            _adapter                  = adapter;
            _protectedOperations      = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil                  = keyUtil;

            _vim.AutoLoadVimRc = false;

#if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
#endif
        }
Exemplo n.º 10
0
 public RemoteHostClientServiceFactory(
     IDiagnosticAnalyzerService analyzerService,
     IEditorOptionsFactoryService editorOptionService)
 {
     _analyzerService = analyzerService;
     _editorOptionService = editorOptionService;
 }
Exemplo n.º 11
0
 internal VimBufferCreationListener(
     IBlockCaretFactoryService blockCaretFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService)
 {
     _blockCaretFactoryService   = blockCaretFactoryService;
     _editorOptionsFatoryService = editorOptionsFactoryService;
 }
 public ReplWindowTextViewCreationListener(IVsEditorAdaptersFactoryService adaptersFactory, IEditorOperationsFactoryService editorOperationsFactory, [Import(typeof(SVsServiceProvider))]IServiceProvider serviceProvider, IEditorOptionsFactoryService editorOptionsFactory) {
     _serviceProvider = serviceProvider;
     _adaptersFactory = adaptersFactory;
     _editorOperationsFactory = editorOperationsFactory;
     _compModel = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));
     _editorOptionsFactory = editorOptionsFactory;
 }
Exemplo n.º 13
0
 public ReplWindowTextViewCreationListener(IVsEditorAdaptersFactoryService adaptersFactory, IEditorOperationsFactoryService editorOperationsFactory, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, IEditorOptionsFactoryService editorOptionsFactory)
 {
     _adaptersFactory         = adaptersFactory;
     _editorOperationsFactory = editorOperationsFactory;
     _compModel            = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));
     _editorOptionsFactory = editorOptionsFactory;
 }
        public GoToDefinitionFilterProvider(
            [Import(typeof(SVsServiceProvider))] System.IServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService editorFactory,
            IEditorOptionsFactoryService editorOptionsFactory,
            ITextDocumentFactoryService textDocumentFactoryService,
            [Import(typeof(DotNetReferenceSourceProvider))] ReferenceSourceProvider referenceSourceProvider,
            VSLanguageService fsharpVsLanguageService,
            ProjectFactory projectFactory)
        {
            _serviceProvider = serviceProvider;
            _editorFactory = editorFactory;
            _editorOptionsFactory = editorOptionsFactory;
            _textDocumentFactoryService = textDocumentFactoryService;
            _referenceSourceProvider = referenceSourceProvider;
            _fsharpVsLanguageService = fsharpVsLanguageService;
            _projectFactory = projectFactory;

            var dte = serviceProvider.GetService(typeof(SDTE)) as DTE;
            var events = dte.Events as Events2;
            if (events != null)
            {
                _solutionEvents = events.SolutionEvents;
                _solutionEvents.AfterClosing += Cleanup;
            }
        }
Exemplo n.º 15
0
 LogEditorProvider(IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService)
 {
     this.dsTextEditorFactoryService  = dsTextEditorFactoryService;
     this.contentTypeRegistryService  = contentTypeRegistryService;
     this.textBufferFactoryService    = textBufferFactoryService;
     this.editorOptionsFactoryService = editorOptionsFactoryService;
 }
        public StreamingFindUsagesPresenter(
            IThreadingContext threadingContext,
            VisualStudioWorkspace workspace,
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            IClassificationFormatMapService classificationFormatMapService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            [ImportMany] IEnumerable <ITableColumnDefinition> columns)
            : base(threadingContext)
        {
            _workspace                 = workspace;
            _serviceProvider           = serviceProvider;
            TextBufferFactoryService   = textBufferFactoryService;
            ContentTypeRegistryService = contentTypeRegistryService;

            TextEditorFactoryService = textEditorFactoryService;
            TypeMap                        = typeMap;
            FormatMapService               = formatMapService;
            ClassificationFormatMap        = classificationFormatMapService.GetClassificationFormatMap("tooltip");
            ProjectionBufferFactoryService = projectionBufferFactoryService;
            EditorOptionsFactoryService    = editorOptionsFactoryService;

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
            _customColumns = columns.OfType <AbstractFindUsagesCustomColumnDefinition>().ToImmutableArray();
        }
Exemplo n.º 17
0
        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            IVsAdapter adapter,
            IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory)
        {
            _vim = vim;
            _keyBindingService = keyBindingService;
            _bufferFactoryService = bufferFactoryService;
            _editorFactoryService = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;

            _vim.AutoLoadVimRc = false;
        }
Exemplo n.º 18
0
        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            IVsAdapter adapter,
            IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory)
        {
            _vim = vim;
            _keyBindingService           = keyBindingService;
            _bufferFactoryService        = bufferFactoryService;
            _editorFactoryService        = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory          = adaptersFactory;
            _adapter                  = adapter;
            _protectedOperations      = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;

            _vim.AutoLoadVimRc = false;
        }
Exemplo n.º 19
0
 public RoslynBlockTag(
     IThreadingContext threadingContext,
     ITextEditorFactoryService textEditorFactoryService,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IBlockTag parent,
     ITextSnapshot snapshot,
     BlockSpan blockSpan)
     : base(
         span: blockSpan.TextSpan.ToSnapshotSpan(snapshot),
         statementSpan: blockSpan.HintSpan.ToSnapshotSpan(snapshot),
         parent: parent,
         type: blockSpan.Type,
         isCollapsible: blockSpan.IsCollapsible,
         isDefaultCollapsed: blockSpan.IsDefaultCollapsed,
         isImplementation: blockSpan.AutoCollapse,
         collapsedForm: null,
         collapsedHintForm: null)
 {
     _state = new BlockTagState(
         threadingContext,
         textEditorFactoryService, projectionBufferFactoryService,
         editorOptionsFactoryService, snapshot, blockSpan);
     Level = parent == null ? 0 : parent.Level + 1;
 }
Exemplo n.º 20
0
        public ContainedDocument(
            IThreadingContext threadingContext,
            DocumentId documentId,
            ITextBuffer subjectBuffer,
            ITextBuffer dataBuffer,
            IVsTextBufferCoordinator bufferCoordinator,
            Workspace workspace,
            VisualStudioProject project,
            IComponentModel componentModel,
            AbstractFormattingRule vbHelperFormattingRule)
            : base(threadingContext)
        {
            _componentModel = componentModel;
            _workspace      = workspace;
            _project        = project;

            Id                = documentId;
            SubjectBuffer     = subjectBuffer;
            DataBuffer        = dataBuffer;
            BufferCoordinator = bufferCoordinator;

            _differenceSelectorService   = componentModel.GetService <ITextDifferencingSelectorService>();
            _editorOptionsFactoryService = _componentModel.GetService <IEditorOptionsFactoryService>();
            _snapshotTracker             = new ReiteratedVersionSnapshotTracker(SubjectBuffer);
            _vbHelperFormattingRule      = vbHelperFormattingRule;

            _hostType = GetHostType();
            s_containedDocuments.TryAdd(documentId, this);
        }
Exemplo n.º 21
0
        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            [EditorUtilsImport] IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil)
        {
            _vim = vim;
            _keyBindingService = keyBindingService;
            _bufferFactoryService = bufferFactoryService;
            _editorFactoryService = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
Exemplo n.º 22
0
 DisplayAppSettingsTabProvider(TextEditorSettingsImpl textEditorSettingsImpl, IEditorOptionsFactoryService editorOptionsFactoryService, FileTreeViewSettingsImpl fileTreeViewSettings, FileTabManagerSettingsImpl fileTabManagerSettings)
 {
     this.textEditorSettingsImpl = textEditorSettingsImpl;
     this.editorOptions          = editorOptionsFactoryService.GlobalOptions;
     this.fileTreeViewSettings   = fileTreeViewSettings;
     this.fileTabManagerSettings = fileTabManagerSettings;
 }
Exemplo n.º 23
0
 WordWrapInit(IAppWindow appWindow, IEditorOptionsFactoryService editorOptionsFactoryService, IAppSettings appSettings, IMessageBoxManager messageBoxManager)
 {
     this.editorOptions            = editorOptionsFactoryService.GlobalOptions;
     this.appSettings              = appSettings;
     this.messageBoxManager        = messageBoxManager;
     appWindow.MainWindow.KeyDown += MainWindow_KeyDown;
 }
Exemplo n.º 24
0
        public PreviewFactoryService(
            IThreadingContext threadingContext,
            ITextBufferFactoryService textBufferFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextDifferencingSelectorService differenceSelectorService,
            IDifferenceBufferFactoryService differenceBufferService,
            IWpfDifferenceViewerFactoryService differenceViewerService)
            : base(threadingContext)
        {
            Contract.ThrowIfFalse(ThreadingContext.HasMainThread);

            _textBufferFactoryService       = textBufferFactoryService;
            _contentTypeRegistryService     = contentTypeRegistryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService    = editorOptionsFactoryService;
            _differenceSelectorService      = differenceSelectorService;
            _differenceBufferService        = differenceBufferService;
            _differenceViewerService        = differenceViewerService;

            _previewRoleSet = textEditorFactoryService.CreateTextViewRoleSet(
                TextViewRoles.PreviewRole, PredefinedTextViewRoles.Analyzable);
        }
Exemplo n.º 25
0
        public StreamingFindUsagesPresenter(
            IThreadingContext threadingContext,
            VisualStudioWorkspace workspace,
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            IClassificationFormatMapService classificationFormatMapService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService)
            : base(threadingContext)
        {
            _workspace                 = workspace;
            _serviceProvider           = serviceProvider;
            TextBufferFactoryService   = textBufferFactoryService;
            ContentTypeRegistryService = contentTypeRegistryService;

            TextEditorFactoryService = textEditorFactoryService;
            TypeMap                        = typeMap;
            FormatMapService               = formatMapService;
            ClassificationFormatMap        = classificationFormatMapService.GetClassificationFormatMap("tooltip");
            ProjectionBufferFactoryService = projectionBufferFactoryService;
            EditorOptionsFactoryService    = editorOptionsFactoryService;

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
 private CSharpCodeModelServiceFactory(
     IEditorOptionsFactoryService editorOptionsFactoryService,
     [ImportMany] IEnumerable<IRefactorNotifyService> refactorNotifyServices)
 {
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _refactorNotifyServices = refactorNotifyServices;
 }
Exemplo n.º 27
0
 internal OpenWithOptionScope(IEditorOptionsFactoryService editorOptionsFactoryService, string optionId, object value)
 {
     this.editorOptionsFactoryService = editorOptionsFactoryService;
     this.optionId = optionId;
     savedValue    = editorOptionsFactoryService.GlobalOptions.GetOptionValue(optionId);
     editorOptionsFactoryService.GlobalOptions.SetOptionValue(optionId, value);
 }
Exemplo n.º 28
0
 internal VimBufferCreationListener(
     IBlockCaretFactoryService blockCaretFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService)
 {
     _blockCaretFactoryService = blockCaretFactoryService;
     _editorOptionsFatoryService = editorOptionsFactoryService;
 }
        public GoToDefinitionFilterProvider(
            [Import(typeof(SVsServiceProvider))] System.IServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService editorFactory,
            IEditorOptionsFactoryService editorOptionsFactory,
            ITextDocumentFactoryService textDocumentFactoryService,
            [Import(typeof(DotNetReferenceSourceProvider))] ReferenceSourceProvider referenceSourceProvider,
            VSLanguageService fsharpVsLanguageService,
            ProjectFactory projectFactory)
        {
            _serviceProvider            = serviceProvider;
            _editorFactory              = editorFactory;
            _editorOptionsFactory       = editorOptionsFactory;
            _textDocumentFactoryService = textDocumentFactoryService;
            _referenceSourceProvider    = referenceSourceProvider;
            _fsharpVsLanguageService    = fsharpVsLanguageService;
            _projectFactory             = projectFactory;

            var dte    = serviceProvider.GetService(typeof(SDTE)) as DTE;
            var events = dte.Events as Events2;

            if (events != null)
            {
                _solutionEvents = events.SolutionEvents;
                _solutionEvents.AfterClosing += Cleanup;
            }
        }
Exemplo n.º 30
0
        public PullRequestEditorService(
            IGitHubServiceProvider serviceProvider,
            IPullRequestService pullRequestService,
            IVsEditorAdaptersFactoryService vsEditorAdaptersFactory,
            IStatusBarNotificationService statusBar,
            IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IUsageTracker usageTracker)
        {
            Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider));
            Guard.ArgumentNotNull(pullRequestService, nameof(pullRequestService));
            Guard.ArgumentNotNull(vsEditorAdaptersFactory, nameof(vsEditorAdaptersFactory));
            Guard.ArgumentNotNull(statusBar, nameof(statusBar));
            Guard.ArgumentNotNull(goToSolutionOrPullRequestFileCommand, nameof(goToSolutionOrPullRequestFileCommand));
            Guard.ArgumentNotNull(goToSolutionOrPullRequestFileCommand, nameof(editorOptionsFactoryService));
            Guard.ArgumentNotNull(usageTracker, nameof(usageTracker));

            this.serviceProvider         = serviceProvider;
            this.pullRequestService      = pullRequestService;
            this.vsEditorAdaptersFactory = vsEditorAdaptersFactory;
            this.statusBar = statusBar;
            this.goToSolutionOrPullRequestFileCommand = goToSolutionOrPullRequestFileCommand;
            this.editorOptionsFactoryService          = editorOptionsFactoryService;
            this.usageTracker = usageTracker;
        }
Exemplo n.º 31
0
 public OutliningTaggerProvider(
     ITextEditorFactoryService textEditorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IProjectionBufferFactoryService projectionBufferFactoryService)
 {
     _ideServices = new IdeServices(textEditorFactoryService,
                                    editorOptionsFactoryService, projectionBufferFactoryService, Dispatcher.CurrentDispatcher);
 }
Exemplo n.º 32
0
 public StructureTaggerProvider(
     IThreadingContext threadingContext,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IAsynchronousOperationListenerProvider listenerProvider)
     : base(threadingContext, editorOptionsFactoryService, projectionBufferFactoryService, listenerProvider)
 {
 }
 public TestInteractiveCommandHandler(
     IInteractiveWindow interactiveWindow,
     IContentTypeRegistryService contentTypeRegistryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService)
     : base(contentTypeRegistryService, editorOptionsFactoryService, editorOperationsFactoryService)
 {
     _interactiveWindow = interactiveWindow;
 }
 public VisualStudio14StructureTaggerProvider(
     IForegroundNotificationService notificationService,
     ITextEditorFactoryService textEditorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners)
     : base(notificationService, textEditorFactoryService, editorOptionsFactoryService, projectionBufferFactoryService, asyncListeners)
 {
 }
Exemplo n.º 35
0
 public CSharpInteractiveCommandHandler(
     CSharpVsInteractiveWindowProvider interactiveWindowProvider,
     IContentTypeRegistryService contentTypeRegistryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService)
     : base(contentTypeRegistryService, editorOptionsFactoryService, editorOperationsFactoryService)
 {
     _interactiveWindowProvider = interactiveWindowProvider;
 }
Exemplo n.º 36
0
        private async void AssertResetInteractive(
            TestWorkspace workspace,
            Project project,
            bool buildSucceeds,
            List <string> expectedReferences = null,
            List <string> expectedUsings     = null)
        {
            expectedReferences = expectedReferences ?? new List <string>();
            expectedUsings     = expectedUsings ?? new List <string>();

            InteractiveWindowTestHost testHost = new InteractiveWindowTestHost();
            List <string>             executedSubmissionCalls = new List <string>();
            EventHandler <string>     ExecuteSubmission       = (_, code) => { executedSubmissionCalls.Add(code); };

            testHost.Evaluator.OnExecute += ExecuteSubmission;

            IWaitIndicator waitIndicator = workspace.GetService <IWaitIndicator>();
            IEditorOptionsFactoryService editorOptionsFactoryService = workspace.GetService <IEditorOptionsFactoryService>();
            var editorOptions    = editorOptionsFactoryService.GetOptions(testHost.Window.CurrentLanguageBuffer);
            var newLineCharacter = editorOptions.GetNewLineCharacter();

            TestResetInteractive resetInteractive = new TestResetInteractive(
                waitIndicator,
                editorOptionsFactoryService,
                CreateReplReferenceCommand,
                CreateImport,
                buildSucceeds: buildSucceeds)
            {
                References           = ImmutableArray.CreateRange(GetProjectReferences(workspace, project)),
                ReferenceSearchPaths = ImmutableArray.Create("rsp1", "rsp2"),
                SourceSearchPaths    = ImmutableArray.Create("ssp1", "ssp2"),
                ProjectNamespaces    = ImmutableArray.Create("System", "ResetInteractiveTestsDocument", "VisualBasicResetInteractiveTestsDocument"),
                NamespacesToImport   = ImmutableArray.Create("System", "ResetInteractiveTestsDocument"),
                ProjectDirectory     = "pj",
            };

            await resetInteractive.Execute(testHost.Window, "Interactive C#");

            // Validate that the project was rebuilt.
            Assert.Equal(1, resetInteractive.BuildProjectCount);
            Assert.Equal(0, resetInteractive.CancelBuildProjectCount);

            var expectedSubmissions = new List <string>();

            if (expectedReferences.Any())
            {
                expectedSubmissions.AddRange(expectedReferences.Select(r => r + newLineCharacter));
            }
            if (expectedUsings.Any())
            {
                expectedSubmissions.Add(string.Join(newLineCharacter, expectedUsings) + newLineCharacter);
            }

            AssertEx.Equal(expectedSubmissions, executedSubmissionCalls);

            testHost.Evaluator.OnExecute -= ExecuteSubmission;
        }
Exemplo n.º 37
0
 protected InteractiveCommandHandler(
     IContentTypeRegistryService contentTypeRegistryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService)
 {
     _contentTypeRegistryService     = contentTypeRegistryService;
     _editorOptionsFactoryService    = editorOptionsFactoryService;
     _editorOperationsFactoryService = editorOperationsFactoryService;
 }
 public CSharpInteractiveCommandHandler(
     CSharpVsInteractiveWindowProvider interactiveWindowProvider,
     IContentTypeRegistryService contentTypeRegistryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService)
     : base(contentTypeRegistryService, editorOptionsFactoryService, editorOperationsFactoryService)
 {
     _interactiveWindowProvider = interactiveWindowProvider;
 }
Exemplo n.º 39
0
 public TestInteractiveCommandHandler(
     IInteractiveWindow interactiveWindow,
     IContentTypeRegistryService contentTypeRegistryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService)
     : base(contentTypeRegistryService, editorOptionsFactoryService, editorOperationsFactoryService)
 {
     _interactiveWindow = interactiveWindow;
 }
 public TagProducer(
     ITextEditorFactoryService textEditorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IProjectionBufferFactoryService projectionBufferFactoryService)
 {
     _textEditorFactoryService       = textEditorFactoryService;
     _editorOptionsFactoryService    = editorOptionsFactoryService;
     _projectionBufferFactoryService = projectionBufferFactoryService;
 }
Exemplo n.º 41
0
 public ProjectionBufferDeferredContentConverter(
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextEditorFactoryService textEditorFactoryService)
 {
     _projectionBufferFactoryService = projectionBufferFactoryService;
     _editorOptionsFactoryService    = editorOptionsFactoryService;
     _textEditorFactoryService       = textEditorFactoryService;
 }
 public AbstractSemanticQuickInfoProvider(
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextEditorFactoryService textEditorFactoryService,
     IGlyphService glyphService,
     ClassificationTypeMap typeMap)
     : base(projectionBufferFactoryService, editorOptionsFactoryService,
            textEditorFactoryService, glyphService, typeMap)
 {
 }
Exemplo n.º 43
0
 public Services(
     IEditorOptionsFactoryService editorOptionsFactory, 
     IEditorOperationsFactoryService editorOperatiosnFactoryService,
     ITextBufferUndoManagerProvider textBufferUndoManagerProvider,
     ITextDocumentFactoryService textDocumentFactoryService)
 {
     _editorOptionsFactory = editorOptionsFactory;
     _editorOperationsFactoryService = editorOperatiosnFactoryService;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _textDocumentFactoryService = textDocumentFactoryService;
 }
Exemplo n.º 44
0
 public RoslynOutliningRegionTag(
     ITextEditorFactoryService textEditorFactoryService,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextSnapshot snapshot,
     BlockSpan blockSpan)
 {
     _state = new BlockTagState(
         textEditorFactoryService, projectionBufferFactoryService,
         editorOptionsFactoryService, snapshot, blockSpan);
 }
 public CSharpInteractiveCommandHandler(
     CSharpVsInteractiveWindowProvider interactiveWindowProvider,
     IContentTypeRegistryService contentTypeRegistryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     IWaitIndicator waitIndicator)
     : base(contentTypeRegistryService, editorOptionsFactoryService, editorOperationsFactoryService, waitIndicator)
 {
     _interactiveWindowProvider = interactiveWindowProvider;
     _sendToInteractiveSubmissionProvider = new CSharpSendToInteractiveSubmissionProvider();
 }
Exemplo n.º 46
0
 public TestResetInteractive(
     IWaitIndicator waitIndicator,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     Func<string, string> createReference,
     Func<string, string> createImport,
     bool buildSucceeds)
     : base(editorOptionsFactoryService, createReference, createImport)
 {
     _waitIndicator = waitIndicator;
     _buildSucceeds = buildSucceeds;
 }
Exemplo n.º 47
0
 public ElisionBufferDeferredContent(
     SnapshotSpan span,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextEditorFactoryService textEditorFactoryService)
 {
     _span = span;
     _projectionBufferFactoryService = projectionBufferFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _textEditorFactoryService = textEditorFactoryService;
 }
 internal CSharpCodeModelService(
     HostLanguageServices languageServiceProvider,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IEnumerable<IRefactorNotifyService> refactorNotifyServices)
     : base(languageServiceProvider,
            editorOptionsFactoryService,
            refactorNotifyServices,
            new BlankLineInGeneratedMethodFormattingRule(),
            new EndRegionFormattingRule())
 {
 }
Exemplo n.º 49
0
		ReplEditorProvider(IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename, ITextViewUndoManagerProvider textViewUndoManagerProvider) {
			this.dsTextEditorFactoryService = dsTextEditorFactoryService;
			this.contentTypeRegistryService = contentTypeRegistryService;
			this.textBufferFactoryService = textBufferFactoryService;
			this.editorOperationsFactoryService = editorOperationsFactoryService;
			this.editorOptionsFactoryService = editorOptionsFactoryService;
			this.classificationTypeRegistryService = classificationTypeRegistryService;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.pickSaveFilename = pickSaveFilename;
			this.textViewUndoManagerProvider = textViewUndoManagerProvider;
		}
Exemplo n.º 50
0
 internal VsAdapter(
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     SVsServiceProvider serviceProvider)
 {
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _serviceProvider = serviceProvider;
     _textManager = _serviceProvider.GetService<SVsTextManager, IVsTextManager>();
     _table = new RunningDocumentTable(_serviceProvider);
     _uiShell = _serviceProvider.GetService<SVsUIShell, IVsUIShell>();
 }
Exemplo n.º 51
0
 public SemanticQuickInfoProvider(
     ITextBufferFactoryService textBufferFactoryService,
     IContentTypeRegistryService contentTypeRegistryService,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextEditorFactoryService textEditorFactoryService,
     IGlyphService glyphService,
     ClassificationTypeMap typeMap)
     : base(textBufferFactoryService, contentTypeRegistryService, projectionBufferFactoryService,
            editorOptionsFactoryService, textEditorFactoryService, glyphService, typeMap)
 {
 }
Exemplo n.º 52
0
		public CodeEditor(CodeEditorOptions options, IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService) {
			options = options?.Clone() ?? new CodeEditorOptions();
			options.CreateGuidObjects = CommonGuidObjectsProvider.Create(options.CreateGuidObjects, new GuidObjectsProvider(this));
			var contentType = contentTypeRegistryService.GetContentType(options.ContentType, options.ContentTypeString) ?? textBufferFactoryService.TextContentType;
			var textBuffer = options.TextBuffer;
			if (textBuffer == null)
				textBuffer = textBufferFactoryService.CreateTextBuffer(contentType);
			var roles = dsTextEditorFactoryService.CreateTextViewRoleSet(options.Roles);
			var textView = dsTextEditorFactoryService.CreateTextView(textBuffer, roles, editorOptionsFactoryService.GlobalOptions, options);
			TextViewHost = dsTextEditorFactoryService.CreateTextViewHost(textView, false);
			TextViewHost.TextView.Options.SetOptionValue(DefaultWpfViewOptions.AppearanceCategory, AppearanceCategoryConstants.TextEditor);
			TextViewHost.TextView.Options.SetOptionValue(DefaultDsTextViewOptions.RefreshScreenOnChangeId, true);
		}
 public CodeFormattingHookHelper(
     IVsEditorAdaptersFactoryService adaptersFactory, 
     IEditorOptionsFactoryService editorOptionsFactory,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     ITextBufferUndoManagerProvider textBufferUndoManagerProvider,
     ITextDocumentFactoryService textDocumentFactoryService)
 {
     _adaptersFactory = adaptersFactory;
     _editorOptionsFactory = editorOptionsFactory;
     _editorOperationsFactorySerivce = editorOperationsFactoryService;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _textDocumentFactoryService = textDocumentFactoryService;
 }
Exemplo n.º 54
0
 protected AbstractQuickInfoProvider(
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextEditorFactoryService textEditorFactoryService,
     IGlyphService glyphService,
     ClassificationTypeMap typeMap)
 {
     _projectionBufferFactoryService = projectionBufferFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _textEditorFactoryService = textEditorFactoryService;
     _glyphService = glyphService;
     _typeMap = typeMap;
 }
Exemplo n.º 55
0
        public SmartIndentProvider(IEditorOptionsFactoryService editorOptionsFactory,
            [ImportMany(typeof(ITaggerProvider))]Lazy<ITaggerProvider, TaggerProviderMetadata>[] classifierProviders) {
            _editorOptionsFactory = editorOptionsFactory;

            // we use a tagger provider here instead of an IClassifierProvider because the 
            // JS language service doesn't actually implement IClassifierProvider and instead implemnets
            // ITaggerProvider<ClassificationTag> instead.  We can get those tags via IClassifierAggregatorService
            // but that merges together adjacent tokens of the same type, so we go straight to the
            // source here.
            _taggerProvider = classifierProviders.Where(
                provider =>
                    provider.Metadata.ContentTypes.Contains(NodejsConstants.JavaScript) &&
                    provider.Metadata.TagTypes.Any(tagType => tagType.IsSubclassOf(typeof(ClassificationTag)))
            ).First().Value;
        }
 public ElisionBufferDeferredContent(
     SnapshotSpan span,
     IProjectionBufferFactoryService projectionBufferFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     ITextEditorFactoryService textEditorFactoryService,
     IContentType contentType = null,
     ITextViewRoleSet roleSet = null)
 {
     _span = span;
     _projectionBufferFactoryService = projectionBufferFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _textEditorFactoryService = textEditorFactoryService;
     _contentType = contentType;
     _roleSet = roleSet ?? _textEditorFactoryService.NoRoles;
 }
Exemplo n.º 57
0
 internal VsAdapter(
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IIncrementalSearchFactoryService incrementalSearchFactoryService,
     SVsServiceProvider serviceProvider)
 {
     _incrementalSearchFactoryService = incrementalSearchFactoryService;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _serviceProvider = serviceProvider;
     _textManager = _serviceProvider.GetService<SVsTextManager, IVsTextManager>();
     _table = new RunningDocumentTable(_serviceProvider);
     _uiShell = _serviceProvider.GetService<SVsUIShell, IVsUIShell>();
     _monitorSelection = _serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();
 }
 public CodeFormattingHookHelper(
     IVsEditorAdaptersFactoryService adaptersFactory, 
     IEditorOptionsFactoryService editorOptionsFactory,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     ITextBufferUndoManagerProvider textBufferUndoManagerProvider,
     ITextDocumentFactoryService textDocumentFactoryService,
     [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider)
 {
     _adaptersFactory = adaptersFactory;
     _editorOptionsFactory = editorOptionsFactory;
     _editorOperationsFactoryService = editorOperationsFactoryService;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _textDocumentFactoryService = textDocumentFactoryService;
     _serviceProvider = serviceProvider;
 }
Exemplo n.º 59
0
        public RoslynOutliningRegionTag(
            ITextEditorFactoryService textEditorFactoryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextSnapshot snapshot,
            BlockSpan outliningSpan)
        {
            _textEditorFactoryService = textEditorFactoryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _subjectBuffer = snapshot.TextBuffer;
            BlockSpan = outliningSpan;

            _hintSpan = snapshot.CreateTrackingSpan(BlockSpan.HintSpan.ToSpan(), SpanTrackingMode.EdgeExclusive);
        }
Exemplo n.º 60
0
 internal VsAdapter(
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IIncrementalSearchFactoryService incrementalSearchFactoryService,
     IPowerToolsUtil powerToolsUtil,
     SVsServiceProvider vsServiceProvider)
 {
     _incrementalSearchFactoryService = incrementalSearchFactoryService;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _serviceProvider = vsServiceProvider;
     _textManager = _serviceProvider.GetService<SVsTextManager, IVsTextManager>();
     _table = new RunningDocumentTable(_serviceProvider);
     _uiShell = _serviceProvider.GetService<SVsUIShell, IVsUIShell>();
     _monitorSelection = _serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();
     _powerToolsUtil = powerToolsUtil;
     _visualStudioVersion = vsServiceProvider.GetVisualStudioVersion();
 }