public RoslynBlockContextProvider( ITextEditorFactoryService textEditorFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService) { _textEditorFactoryService = textEditorFactoryService; _projectionBufferFactoryService = projectionBufferFactoryService; }
public ProjectionTextViewModelProvider( IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService) { _projectionBufferFactoryService = projectionBufferFactoryService; _contentTypeRegistryService = contentTypeRegistryService; }
public InteractiveWindowProvider( IContentTypeRegistryService contentTypeRegistry, ITextBufferFactoryService bufferFactory, IProjectionBufferFactoryService projectionBufferFactory, IEditorOperationsFactoryService editorOperationsFactory, ITextBufferUndoManagerProvider textBufferUndoManagerProvider, ITextEditorFactoryService editorFactory, IRtfBuilderService rtfBuilderService, IIntellisenseSessionStackMapService intellisenseSessionStackMap, ISmartIndentationService smartIndenterService, IInteractiveWindowEditorFactoryService windowFactoryService, IWaitIndicator waitIndicator) { _contentTypeRegistry = contentTypeRegistry; _bufferFactory = bufferFactory; _projectionBufferFactory = projectionBufferFactory; _editorOperationsFactory = editorOperationsFactory; _textBufferUndoManagerProvider = textBufferUndoManagerProvider; _editorFactory = editorFactory; _rtfBuilderService = rtfBuilderService; _intellisenseSessionStackMap = intellisenseSessionStackMap; _smartIndenterService = smartIndenterService; _windowFactoryService = windowFactoryService; _waitIndicator = waitIndicator; }
public TemplateProjectionBuffer(IContentTypeRegistryService contentRegistry, IProjectionBufferFactoryService bufferFactory, ITextBuffer diskBuffer, IBufferGraphFactoryService bufferGraphFactory, IContentType contentType) { _diskBuffer = diskBuffer; _contentRegistry = contentRegistry; _contentType = contentType; _projBuffer = bufferFactory.CreateProjectionBuffer( this, new object[0], ProjectionBufferOptions.None ); _projBuffer.Properties.AddProperty(typeof(TemplateProjectionBuffer), this); _bufferGraph = bufferGraphFactory.CreateBufferGraph(_projBuffer); _htmlBuffer = CreateHtmlBuffer(bufferFactory); _templateBuffer = CreateTemplateBuffer(bufferFactory); IVsTextBuffer buffer; if (_diskBuffer.Properties.TryGetProperty <IVsTextBuffer>(typeof(IVsTextBuffer), out buffer)) { // keep the Venus HTML classifier happy - it wants to find a site via IVsTextBuffer _htmlBuffer.Properties.AddProperty(typeof(IVsTextBuffer), buffer); } var reader = new SnapshotSpanSourceCodeReader(new SnapshotSpan(diskBuffer.CurrentSnapshot, new Span(0, diskBuffer.CurrentSnapshot.Length))); UpdateTemplateSpans(reader); }
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 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; }
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); }
public EditorTracker([Import] ITextBufferFactoryService _textBufferFactoryService, [Import] IProjectionBufferFactoryService _projectionBufferFactoryService, [Import] ITextDocumentFactoryService textDocumentFactoryService) { this.textDocumentFactoryService = textDocumentFactoryService; _textBufferFactoryService.TextBufferCreated += (o, e) => { try { _objectTracker?.AddObjectToTrack(e.TextBuffer, ObjSource.FromTextBufferFactoryService, description: e.TextBuffer.ContentType.DisplayName); } catch (Exception) { } }; _projectionBufferFactoryService.ProjectionBufferCreated += (o, e) => { try { _objectTracker?.AddObjectToTrack(e.TextBuffer, ObjSource.FromProjectionBufferFactoryService, description: e.TextBuffer.ContentType.DisplayName); } catch (Exception) { } }; }
public ProjectionTextViewModel( IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextDataModel dataModel) { DataModel = dataModel; // Initially, populate projection buffer with single span covering entire data buffer. // We'll update this before the view actually becomes visible. var snapshot = dataModel.DataBuffer.CurrentSnapshot; var span = snapshot.CreateTrackingSpan( new Span(0, snapshot.Length), SpanTrackingMode.EdgeExclusive); var projectionContentType = contentTypeRegistryService.GetContentType(ContentTypeNames.ShaderLabProjectionContentType); var projectionBuffer = projectionBufferFactoryService.CreateProjectionBuffer( null, new List <object> { span }, ProjectionBufferOptions.None, projectionContentType); EditBuffer = VisualBuffer = projectionBuffer; dataModel.DataBuffer.Properties.GetOrCreateSingletonProperty(() => projectionBuffer); Properties = new PropertyCollection(); }
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; }
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(); }
public InteractiveWindow( IInteractiveWindowEditorFactoryService host, IContentTypeRegistryService contentTypeRegistry, ITextBufferFactoryService bufferFactory, IProjectionBufferFactoryService projectionBufferFactory, IEditorOperationsFactoryService editorOperationsFactory, ITextEditorFactoryService editorFactory, IRtfBuilderService rtfBuilderService, IIntellisenseSessionStackMapService intellisenseSessionStackMap, ISmartIndentationService smartIndenterService, IInteractiveEvaluator evaluator) { if (evaluator == null) { throw new ArgumentNullException(nameof(evaluator)); } _uiOnly = new UIThreadOnly( this, host, contentTypeRegistry, bufferFactory, projectionBufferFactory, editorOperationsFactory, editorFactory, rtfBuilderService, intellisenseSessionStackMap, smartIndenterService, evaluator); evaluator.CurrentWindow = this; RequiresUIThread(); }
public PhpProjectionBuffer( IContentTypeRegistryService contentRegistry, IProjectionBufferFactoryService bufferFactory, IBufferTagAggregatorFactoryService bufferTagAggregatorFactory, ITextBuffer diskBuffer, IBufferGraphFactoryService bufferGraphFactory, IContentType contentType) { _diskBuffer = diskBuffer; _contentRegistry = contentRegistry; _contentType = contentType; _projBuffer = CreateProjectionBuffer(bufferFactory); _htmlBuffer = CreateHtmlBuffer(bufferFactory); _templateBuffer = CreateTemplateBuffer(bufferFactory); _bufferGraph = bufferGraphFactory.CreateBufferGraph(_projBuffer); _contentTypeTagger = bufferTagAggregatorFactory.CreateTagAggregator <ContentTypeTag>(_diskBuffer); _contentTypeTagger.TagsChanged += HandleContentTypeTagsChanged; IVsTextBuffer buffer; if (_diskBuffer.Properties.TryGetProperty <IVsTextBuffer>(typeof(IVsTextBuffer), out buffer)) { // keep the Venus HTML classifier happy - it wants to find a site via IVsTextBuffer _htmlBuffer.Properties.AddProperty(typeof(IVsTextBuffer), buffer); } HandleContentTypeTagsChanged(); }
private IProjectionBuffer CreateProjectionBuffer(IProjectionBufferFactoryService bufferFactory) { var res = bufferFactory.CreateProjectionBuffer(this, new object[0], ProjectionBufferOptions.None); res.Properties.AddProperty(typeof(PhpProjectionBuffer), this); return(res); }
protected AbstractDebuggerIntelliSenseContext( IWpfTextView wpfTextView, IVsTextView vsTextView, IVsTextLines vsDebuggerTextLines, ITextBuffer contextBuffer, TextManager.Interop.TextSpan[] currentStatementSpan, IComponentModel componentModel, IServiceProvider serviceProvider, IContentType contentType ) { _textView = wpfTextView; _debuggerTextLines = vsDebuggerTextLines; this.ContextBuffer = contextBuffer; this.CurrentStatementSpan = currentStatementSpan[0]; _contentType = contentType; _originalContentType = _textView.TextBuffer.ContentType; this.ProjectionBufferFactoryService = componentModel.GetService <IProjectionBufferFactoryService>(); _bufferGraphFactoryService = componentModel.GetService <IBufferGraphFactoryService>(); _isImmediateWindow = IsImmediateWindow( (IVsUIShell)serviceProvider.GetService(typeof(SVsUIShell)), vsTextView ); }
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 InteractiveWindowProvider( IContentTypeRegistryService contentTypeRegistry, ITextBufferFactoryService bufferFactory, IProjectionBufferFactoryService projectionBufferFactory, IEditorOperationsFactoryService editorOperationsFactory, ITextBufferUndoManagerProvider textBufferUndoManagerProvider, ITextEditorFactoryService editorFactory, IRtfBuilderService rtfBuilderService, IIntellisenseSessionStackMapService intellisenseSessionStackMap, ISmartIndentationService smartIndenterService, IInteractiveWindowEditorFactoryService windowFactoryService, IUIThreadOperationExecutor uiThreadOperationExecutor) { _contentTypeRegistry = contentTypeRegistry; _bufferFactory = bufferFactory; _projectionBufferFactory = projectionBufferFactory; _editorOperationsFactory = editorOperationsFactory; _textBufferUndoManagerProvider = textBufferUndoManagerProvider; _editorFactory = editorFactory; _rtfBuilderService = rtfBuilderService; _intellisenseSessionStackMap = intellisenseSessionStackMap; _smartIndenterService = smartIndenterService; _windowFactoryService = windowFactoryService; _uiThreadOperationExecutor = uiThreadOperationExecutor; }
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)); }
public StructureTaggerProvider( IThreadingContext threadingContext, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, IAsynchronousOperationListenerProvider listenerProvider) : base(threadingContext, editorOptionsFactoryService, projectionBufferFactoryService, listenerProvider) { }
public VsMdEditorDocument(IEditorInstance editorInstance, IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService) : base(editorInstance.ViewBuffer, projectionBufferFactoryService, contentTypeRegistryService) { _editorInstance = editorInstance; ServiceManager.AddService <VsMdEditorDocument>(this, TextBuffer); }
public OutliningTaggerProvider( ITextEditorFactoryService textEditorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService) { _ideServices = new IdeServices(textEditorFactoryService, editorOptionsFactoryService, projectionBufferFactoryService, Dispatcher.CurrentDispatcher); }
public BufferTracker(ITextBufferFactoryService textBufferFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService) { this.textBufferFactoryService = textBufferFactoryService; this.projectionBufferFactoryService = projectionBufferFactoryService; textBufferFactoryService.TextBufferCreated += OnBufferCreated; projectionBufferFactoryService.ProjectionBufferCreated += OnBufferCreated; }
public VisualStudio14StructureTaggerProvider( IForegroundNotificationService notificationService, ITextEditorFactoryService textEditorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, IAsynchronousOperationListenerProvider listenerProvider) : base(notificationService, textEditorFactoryService, editorOptionsFactoryService, projectionBufferFactoryService, listenerProvider) { }
public StructureTaggerProvider( IThreadingContext threadingContext, EditorOptionsService editorOptionsService, IProjectionBufferFactoryService projectionBufferFactoryService, [Import(AllowDefault = true)] ITextBufferVisibilityTracker?visibilityTracker, IAsynchronousOperationListenerProvider listenerProvider) : base(threadingContext, editorOptionsService, projectionBufferFactoryService, visibilityTracker, listenerProvider) { }
public TagProducer( ITextEditorFactoryService textEditorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService) { _textEditorFactoryService = textEditorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _projectionBufferFactoryService = projectionBufferFactoryService; }
public VisualStudio14StructureTaggerProvider( IForegroundNotificationService notificationService, ITextEditorFactoryService textEditorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners) : base(notificationService, textEditorFactoryService, editorOptionsFactoryService, projectionBufferFactoryService, asyncListeners) { }
public static IElisionBuffer CreateElisionBufferWithoutIndentation( this IProjectionBufferFactoryService factoryService, IEditorOptions editorOptions, params SnapshotSpan[] exposedSpans) { return(factoryService.CreateElisionBufferWithoutIndentation( editorOptions, (IEnumerable <SnapshotSpan>)exposedSpans)); }
public RoslynBlockContextProvider( IThreadingContext threadingContext, ITextEditorFactoryService textEditorFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService) : base(threadingContext) { _textEditorFactoryService = textEditorFactoryService; _projectionBufferFactoryService = projectionBufferFactoryService; }
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) { }
public MdEditorDocument(ITextBuffer textBuffer, IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, ICoreShell coreShell) { this.TextBuffer = textBuffer; ServiceManager.AddService(this, TextBuffer, coreShell); _projectionBufferManager = new ProjectionBufferManager(textBuffer, projectionBufferFactoryService, contentTypeRegistryService, coreShell, MdProjectionContentTypeDefinition.ContentType, RContentTypeDefinition.ContentType); ContainedLanguageHandler = _rLanguageHandler = new RLanguageHandler(textBuffer, _projectionBufferManager, coreShell); }
public VisualStudioForMacStructureTaggerProvider( IThreadingContext threadingContext, IForegroundNotificationService notificationService, ICocoaTextEditorFactoryService textEditorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, IAsynchronousOperationListenerProvider listenerProvider) : base(threadingContext, notificationService, textEditorFactoryService, editorOptionsFactoryService, projectionBufferFactoryService, listenerProvider) { }
protected AbstractStructureTaggerProvider( IThreadingContext threadingContext, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, IAsynchronousOperationListenerProvider listenerProvider) : base(threadingContext, listenerProvider.GetListener(FeatureAttribute.Outlining)) { EditorOptionsFactoryService = editorOptionsFactoryService; ProjectionBufferFactoryService = projectionBufferFactoryService; }
public SyntacticQuickInfoProvider( IProjectionBufferFactoryService projectionBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ITextEditorFactoryService textEditorFactoryService, IGlyphService glyphService, ClassificationTypeMap typeMap) : base(projectionBufferFactoryService, editorOptionsFactoryService, textEditorFactoryService, glyphService, typeMap) { }
public RoslynOutliningRegionTag( ITextEditorFactoryService textEditorFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ITextSnapshot snapshot, BlockSpan blockSpan) { _state = new BlockTagState( textEditorFactoryService, projectionBufferFactoryService, editorOptionsFactoryService, snapshot, blockSpan); }
public ElisionBufferDeferredContent( SnapshotSpan span, IProjectionBufferFactoryService projectionBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ITextEditorFactoryService textEditorFactoryService) { _span = span; _projectionBufferFactoryService = projectionBufferFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _textEditorFactoryService = textEditorFactoryService; }
public CodeContentControlProvider(ITextEditorFactoryService textEditorFactory, IProjectionBufferFactoryService projectionFactory, TextViewConnectionListener textViewConnectionListener, ITextBufferFactoryService textBufferFactoryService, ITextEditorFactoryService textEditorFactoryService) { _textEditorFactory = textEditorFactory; _projectionFactory = projectionFactory; _textViewConnectionListener = textViewConnectionListener; _textBufferFactoryService = textBufferFactoryService; _textEditorFactoryService = textEditorFactoryService; }
public SemanticQuickInfoProvider( ITextBufferFactoryService textBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, IProjectionBufferFactoryService projectionBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ITextEditorFactoryService textEditorFactoryService, IGlyphService glyphService, ClassificationTypeMap typeMap) : base(textBufferFactoryService, contentTypeRegistryService, projectionBufferFactoryService, editorOptionsFactoryService, textEditorFactoryService, glyphService, typeMap) { }
protected AbstractQuickInfoProvider( IProjectionBufferFactoryService projectionBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ITextEditorFactoryService textEditorFactoryService, IGlyphService glyphService, ClassificationTypeMap typeMap) { _projectionBufferFactoryService = projectionBufferFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _textEditorFactoryService = textEditorFactoryService; _glyphService = glyphService; _typeMap = typeMap; }
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); }
// Constructor for testing protected AbstractDebuggerIntelliSenseContext(IWpfTextView wpfTextView, ITextBuffer contextBuffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] currentStatementSpan, IComponentModel componentModel, IContentType contentType, bool isImmediateWindow) { _textView = wpfTextView; this.ContextBuffer = contextBuffer; this.CurrentStatementSpan = currentStatementSpan[0]; _contentType = contentType; this.ProjectionBufferFactoryService = componentModel.GetService<IProjectionBufferFactoryService>(); _bufferGraphFactoryService = componentModel.GetService<IBufferGraphFactoryService>(); _isImmediateWindow = isImmediateWindow; }
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; }
public Tag( ITextBuffer subjectBuffer, string replacementString, SnapshotSpan hintSpan, bool isImplementation, ITextEditorFactoryService textEditorFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService) { _subjectBuffer = subjectBuffer; this.CollapsedForm = replacementString; _hintSpan = hintSpan.Snapshot.CreateTrackingSpan(hintSpan.Span, SpanTrackingMode.EdgeExclusive); this.IsImplementation = isImplementation; this.IsDefaultCollapsed = false; _textEditorFactoryService = textEditorFactoryService; _projectionBufferFactoryService = projectionBufferFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; }
public InteractiveWindowProvider( IContentTypeRegistryService contentTypeRegistry, ITextBufferFactoryService bufferFactory, IProjectionBufferFactoryService projectionBufferFactory, IEditorOperationsFactoryService editorOperationsFactory, ITextEditorFactoryService editorFactory, IIntellisenseSessionStackMapService intellisenseSessionStackMap, ISmartIndentationService smartIndenterService, IInteractiveWindowEditorFactoryService windowFactoryService) { _contentTypeRegistry = contentTypeRegistry; _bufferFactory = bufferFactory; _projectionBufferFactory = projectionBufferFactory; _editorOperationsFactory = editorOperationsFactory; _editorFactory = editorFactory; _intellisenseSessionStackMap = intellisenseSessionStackMap; _smartIndenterService = smartIndenterService; _windowFactoryService = windowFactoryService; }
protected AbstractDebuggerIntelliSenseContext( IWpfTextView wpfTextView, IVsTextView vsTextView, IVsTextLines vsDebuggerTextLines, ITextBuffer contextBuffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] currentStatementSpan, IComponentModel componentModel, IServiceProvider serviceProvider, IContentType contentType) { _textView = wpfTextView; _debuggerTextLines = vsDebuggerTextLines; this.ContextBuffer = contextBuffer; this.CurrentStatementSpan = currentStatementSpan[0]; _contentType = contentType; this.ProjectionBufferFactoryService = componentModel.GetService<IProjectionBufferFactoryService>(); _bufferGraphFactoryService = componentModel.GetService<IBufferGraphFactoryService>(); _isImmediateWindow = IsImmediateWindow((IVsUIShell)serviceProvider.GetService(typeof(SVsUIShell)), vsTextView); }
public ProjectionBufferManager(ITextBuffer diskBuffer, IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, ICoreShell coreShell, string topLevelContentTypeName, string secondaryContentTypeName) { DiskBuffer = diskBuffer; _contentTypeRegistryService = contentTypeRegistryService; var contentType = _contentTypeRegistryService.GetContentType(topLevelContentTypeName); ViewBuffer = projectionBufferFactoryService.CreateProjectionBuffer(null, new List<object>(0), ProjectionBufferOptions.None, contentType); contentType = _contentTypeRegistryService.GetContentType(secondaryContentTypeName); ContainedLanguageBuffer = projectionBufferFactoryService.CreateProjectionBuffer(null, new List<object>(0), ProjectionBufferOptions.WritableLiteralSpans, contentType); ServiceManager.AddService<IProjectionBufferManager>(this, DiskBuffer, coreShell); ServiceManager.AddService<IProjectionBufferManager>(this, ViewBuffer, coreShell); }
public PreviewFactoryService( ITextBufferFactoryService textBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, IProjectionBufferFactoryService projectionBufferFactoryService, ITextEditorFactoryService textEditorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ITextDifferencingSelectorService differenceSelectorService, IDifferenceBufferFactoryService differenceBufferService, IWpfDifferenceViewerFactoryService differenceViewerService) { _textBufferFactoryService = textBufferFactoryService; _contentTypeRegistryService = contentTypeRegistryService; _projectionBufferFactoryService = projectionBufferFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _differenceSelectorService = differenceSelectorService; _differenceBufferService = differenceBufferService; _differenceViewerService = differenceViewerService; _previewRoleSet = textEditorFactoryService.CreateTextViewRoleSet( TextViewRoles.PreviewRole, PredefinedTextViewRoles.Analyzable); }
public StreamingFindUsagesPresenter( Shell.SVsServiceProvider serviceProvider, ITextBufferFactoryService textBufferFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ITextEditorFactoryService textEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ClassificationTypeMap typeMap, IEditorFormatMapService formatMapService) { _serviceProvider = serviceProvider; _textBufferFactoryService = textBufferFactoryService; _projectionBufferFactoryService = projectionBufferFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _contentTypeRegistryService = contentTypeRegistryService; _textEditorFactoryService = textEditorFactoryService; _typeMap = typeMap; _formatMapService = formatMapService; _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences)); }
public RoslynBlockTag( 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( textEditorFactoryService, projectionBufferFactoryService, editorOptionsFactoryService, snapshot, blockSpan); Level = parent == null ? 0 : parent.Level + 1; }
public VsMdEditorDocument(IEditorInstance editorInstance, IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, ICoreShell shell) : base(editorInstance.ViewBuffer, projectionBufferFactoryService, contentTypeRegistryService, shell) { _editorInstance = editorInstance; ServiceManager.AddService<VsMdEditorDocument>(this, TextBuffer, shell); }
public VsMdEditorDocumentFactory(IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, ICoreShell shell) : base(projectionBufferFactoryService, contentTypeRegistryService, shell) {}
public virtual void SetupBase() { _compositionContainer = GetOrCreateCompositionContainer(); _textBufferFactoryService = _compositionContainer.GetExportedValue<ITextBufferFactoryService>(); _textEditorFactoryService = _compositionContainer.GetExportedValue<ITextEditorFactoryService>(); _projectionBufferFactoryService = _compositionContainer.GetExportedValue<IProjectionBufferFactoryService>(); _smartIndentationService = _compositionContainer.GetExportedValue<ISmartIndentationService>(); _editorOperationsFactoryService = _compositionContainer.GetExportedValue<IEditorOperationsFactoryService>(); _editorOptionsFactoryService = _compositionContainer.GetExportedValue<IEditorOptionsFactoryService>(); _textSearchService = _compositionContainer.GetExportedValue<ITextSearchService>(); _outliningManagerService = _compositionContainer.GetExportedValue<IOutliningManagerService>(); _textBufferUndoManagerProvider = _compositionContainer.GetExportedValue<ITextBufferUndoManagerProvider>(); _contentTypeRegistryService = _compositionContainer.GetExportedValue<IContentTypeRegistryService>(); _adhocOutlinerFactory = _compositionContainer.GetExportedValue<IAdhocOutlinerFactory>(); _taggerFactory = _compositionContainer.GetExportedValue<ITaggerFactory>(); }
private static IProjectionBuffer CreateProjectionBuffer( IProjectionBufferFactoryService factoryService, IContentTypeRegistryService registryService, IEditorOptions editorOptions, ITextSnapshot snapshot, string separator, object suffixOpt, bool trim, params LineSpan[] exposedLineSpans) { var spans = new List<object>(); if (exposedLineSpans.Length > 0) { if (exposedLineSpans[0].Start > 0 && !string.IsNullOrEmpty(separator)) { spans.Add(separator); spans.Add(editorOptions.GetNewLineCharacter()); } var snapshotSpanRanges = CreateSnapshotSpanRanges(snapshot, exposedLineSpans); var indentColumn = trim ? DetermineIndentationColumn(editorOptions, snapshotSpanRanges.Flatten()) : 0; foreach (var snapshotSpanRange in snapshotSpanRanges) { foreach (var snapshotSpan in snapshotSpanRange) { var line = snapshotSpan.Snapshot.GetLineFromPosition(snapshotSpan.Start); var indentPosition = line.GetLineOffsetFromColumn(indentColumn, editorOptions) + line.Start; var mappedSpan = new SnapshotSpan(snapshotSpan.Snapshot, Span.FromBounds(indentPosition, snapshotSpan.End)); var trackingSpan = mappedSpan.CreateTrackingSpan(SpanTrackingMode.EdgeExclusive); spans.Add(trackingSpan); // Add a newline between every line. if (snapshotSpan != snapshotSpanRange.Last()) { spans.Add(editorOptions.GetNewLineCharacter()); } } // Add a separator between every set of lines. if (snapshotSpanRange != snapshotSpanRanges.Last()) { spans.Add(editorOptions.GetNewLineCharacter()); spans.Add(separator); spans.Add(editorOptions.GetNewLineCharacter()); } } if (snapshot.GetLineNumberFromPosition(snapshotSpanRanges.Last().Last().End) < snapshot.LineCount - 1) { spans.Add(editorOptions.GetNewLineCharacter()); spans.Add(separator); } } if (suffixOpt != null) { if (spans.Count >= 0) { if (!separator.Equals(spans.Last())) { spans.Add(editorOptions.GetNewLineCharacter()); spans.Add(separator); } spans.Add(editorOptions.GetNewLineCharacter()); } spans.Add(suffixOpt); } return factoryService.CreateProjectionBuffer( projectionEditResolver: null, sourceSpans: spans, options: ProjectionBufferOptions.None, contentType: registryService.GetContentType(ShaderPreviewContentType)); }
public MdEditorDocumentFactory(IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, ICoreShell shell) { _projectionBufferFactoryService = projectionBufferFactoryService; _contentTypeRegistryService = contentTypeRegistryService; _shell = shell; }
public InteractiveWindow( IInteractiveWindowEditorFactoryService host, IContentTypeRegistryService contentTypeRegistry, ITextBufferFactoryService bufferFactory, IProjectionBufferFactoryService projectionBufferFactory, IEditorOperationsFactoryService editorOperationsFactory, ITextEditorFactoryService editorFactory, IIntellisenseSessionStackMapService intellisenseSessionStackMap, ISmartIndentationService smartIndenterService, IInteractiveEvaluator evaluator) { if (evaluator == null) { throw new ArgumentNullException(nameof(evaluator)); } _dangerous_uiOnly = new UIThreadOnly(this, host); this.Properties = new PropertyCollection(); _history = new History(); _intellisenseSessionStackMap = intellisenseSessionStackMap; _smartIndenterService = smartIndenterService; var textContentType = contentTypeRegistry.GetContentType("text"); var replContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveContentTypeName); var replOutputContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveOutputContentTypeName); _outputBuffer = bufferFactory.CreateTextBuffer(replOutputContentType); _standardInputBuffer = bufferFactory.CreateTextBuffer(); var projBuffer = projectionBufferFactory.CreateProjectionBuffer( new EditResolver(this), Array.Empty<object>(), ProjectionBufferOptions.None, replContentType); // we need to set IReplPromptProvider property before TextViewHost is instantiated so that ReplPromptTaggerProvider can bind to it projBuffer.Properties.AddProperty(typeof(InteractiveWindow), this); _projectionBuffer = projBuffer; _dangerous_uiOnly.AppendNewOutputProjectionBuffer(); // Constructor runs on UI thread. projBuffer.Changed += new EventHandler<TextContentChangedEventArgs>(ProjectionBufferChanged); var roleSet = editorFactory.CreateTextViewRoleSet( PredefinedTextViewRoles.Analyzable, PredefinedTextViewRoles.Editable, PredefinedTextViewRoles.Interactive, PredefinedTextViewRoles.Zoomable, PredefinedInteractiveTextViewRoles.InteractiveTextViewRole); _textView = host.CreateTextView(this, projBuffer, roleSet); _textView.Caret.PositionChanged += CaretPositionChanged; _textView.Options.SetOptionValue(DefaultTextViewHostOptions.HorizontalScrollBarId, false); _textView.Options.SetOptionValue(DefaultTextViewHostOptions.LineNumberMarginId, false); _textView.Options.SetOptionValue(DefaultTextViewHostOptions.OutliningMarginId, false); _textView.Options.SetOptionValue(DefaultTextViewHostOptions.GlyphMarginId, false); _textView.Options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.WordWrap); _lineBreakString = _textView.Options.GetNewLineCharacter(); _dangerous_uiOnly.EditorOperations = editorOperationsFactory.GetEditorOperations(_textView); // Constructor runs on UI thread. _buffer = new OutputBuffer(this); _outputWriter = new InteractiveWindowWriter(this, spans: null); SortedSpans errorSpans = new SortedSpans(); _errorOutputWriter = new InteractiveWindowWriter(this, errorSpans); OutputClassifierProvider.AttachToBuffer(_outputBuffer, errorSpans); RequiresUIThread(); evaluator.CurrentWindow = this; _evaluator = evaluator; }
public UIThreadOnly( InteractiveWindow window, IInteractiveWindowEditorFactoryService factory, IContentTypeRegistryService contentTypeRegistry, ITextBufferFactoryService bufferFactory, IProjectionBufferFactoryService projectionBufferFactory, IEditorOperationsFactoryService editorOperationsFactory, ITextEditorFactoryService editorFactory, IRtfBuilderService rtfBuilderService, IIntellisenseSessionStackMapService intellisenseSessionStackMap, ISmartIndentationService smartIndenterService, IInteractiveEvaluator evaluator, IWaitIndicator waitIndicator) { _window = window; _factory = factory; _rtfBuilderService = (IRtfBuilderService2)rtfBuilderService; _intellisenseSessionStackMap = intellisenseSessionStackMap; _smartIndenterService = smartIndenterService; _waitIndicator = waitIndicator; Evaluator = evaluator; var replContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveContentTypeName); var replOutputContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveOutputContentTypeName); OutputBuffer = bufferFactory.CreateTextBuffer(replOutputContentType); StandardInputBuffer = bufferFactory.CreateTextBuffer(); _inertType = bufferFactory.InertContentType; _projectionBuffer = projectionBufferFactory.CreateProjectionBuffer( new EditResolver(window), Array.Empty<object>(), ProjectionBufferOptions.None, replContentType); _projectionBuffer.Properties.AddProperty(typeof(InteractiveWindow), window); AppendNewOutputProjectionBuffer(); _projectionBuffer.Changed += new EventHandler<TextContentChangedEventArgs>(ProjectionBufferChanged); var roleSet = editorFactory.CreateTextViewRoleSet( PredefinedTextViewRoles.Analyzable, PredefinedTextViewRoles.Editable, PredefinedTextViewRoles.Interactive, PredefinedTextViewRoles.Zoomable, PredefinedInteractiveTextViewRoles.InteractiveTextViewRole); TextView = factory.CreateTextView(window, _projectionBuffer, roleSet); TextView.Caret.PositionChanged += CaretPositionChanged; var options = TextView.Options; options.SetOptionValue(DefaultTextViewHostOptions.HorizontalScrollBarId, true); options.SetOptionValue(DefaultTextViewHostOptions.LineNumberMarginId, false); options.SetOptionValue(DefaultTextViewHostOptions.OutliningMarginId, false); options.SetOptionValue(DefaultTextViewHostOptions.GlyphMarginId, false); options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.None); _lineBreakString = options.GetNewLineCharacter(); EditorOperations = editorOperationsFactory.GetEditorOperations(TextView); _buffer = new OutputBuffer(window); OutputWriter = new InteractiveWindowWriter(window, spans: null); SortedSpans errorSpans = new SortedSpans(); ErrorOutputWriter = new InteractiveWindowWriter(window, errorSpans); OutputClassifierProvider.AttachToBuffer(OutputBuffer, errorSpans); }