Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 private IWpfTextView CreateElisionBufferView(ITextBuffer finalBuffer)
 {
     return(BlockTagState.CreateShrunkenTextView(
                _provider._textEditorFactoryService, finalBuffer));
 }