57 references to TabSize
Microsoft.CodeAnalysis.CSharp.Features (14)
ConvertNamespaceTransform.cs (1)
116
return indentation.GetIndentationString(document.Text, options.UseTabs, options.
TabSize
);
Snippets\AbstractCSharpTypeSnippetProvider.cs (2)
80
var newIndentation = new IndentationResult(indentation.BasePosition, indentation.Offset + syntaxFormattingOptions.
TabSize
);
81
return newIndentation.GetIndentationString(parsedDocument.Text, syntaxFormattingOptions.UseTabs, syntaxFormattingOptions.
TabSize
) + newLine;
Snippets\CSharpConstructorSnippetProvider.cs (2)
74
var newIndentation = new IndentationResult(indentation.BasePosition, indentation.Offset + syntaxFormattingOptions.
TabSize
);
75
return newIndentation.GetIndentationString(parsedDocument.Text, syntaxFormattingOptions.UseTabs, syntaxFormattingOptions.
TabSize
) + newLine;
Snippets\CSharpElseSnippetProvider.cs (2)
96
var newIndentation = new IndentationResult(indentation.BasePosition, indentation.Offset + syntaxFormattingOptions.
TabSize
);
97
return newIndentation.GetIndentationString(parsedDocument.Text, syntaxFormattingOptions.UseTabs, syntaxFormattingOptions.
TabSize
) + newLine;
Snippets\CSharpForEachLoopSnippetProvider.cs (2)
83
var newIndentation = new IndentationResult(indentation.BasePosition, indentation.Offset + syntaxFormattingOptions.
TabSize
);
84
return newIndentation.GetIndentationString(parsedDocument.Text, syntaxFormattingOptions.UseTabs, syntaxFormattingOptions.
TabSize
) + newLine;
Snippets\CSharpIfSnippetProvider.cs (2)
60
var newIndentation = new IndentationResult(indentation.BasePosition, indentation.Offset + syntaxFormattingOptions.
TabSize
);
61
return newIndentation.GetIndentationString(parsedDocument.Text, syntaxFormattingOptions.UseTabs, syntaxFormattingOptions.
TabSize
) + newLine;
Snippets\CSharpWhileLoopSnippetProvider.cs (2)
60
var newIndentation = new IndentationResult(indentation.BasePosition, indentation.Offset + syntaxFormattingOptions.
TabSize
);
61
return newIndentation.GetIndentationString(parsedDocument.Text, syntaxFormattingOptions.UseTabs, syntaxFormattingOptions.
TabSize
) + newLine;
SplitStringLiteral\StringSplitter.cs (1)
42
protected int TabSize => IndentationOptions.FormattingOptions.
TabSize
;
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
CSharpTriviaFormatter.cs (1)
221
Options.
TabSize
,
CSharpTriviaFormatter.DocumentationCommentExteriorCommentRewriter.cs (1)
50
_options.
TabSize
);
TriviaDataFactory.CodeShapeAnalyzer.cs (2)
149
_indentation += text.ConvertTabToSpace(_options.
TabSize
, _indentation, text.Length);
205
ShouldFormatSingleLineDocumentationComment(_indentation, _options.
TabSize
, trivia))
TriviaDataFactory.ComplexTrivia.cs (1)
30
=> text.ProcessTextBetweenTokens(this.TreeInfo, this.Token1, this.Options.
TabSize
, out lines, out spaces);
TriviaDataFactory.cs (6)
132
var initialColumn = (token1.RawKind == 0) ? 0 : this.TreeInfo.GetOriginalColumn(Options.
TabSize
, token1) + token1.Span.Length;
135
return textSnippet.ConvertTabToSpace(Options.
TabSize
, initialColumn, textSnippet.Length);
143
var indentation = result.Tab * Options.
TabSize
+ result.Space;
173
if (result.Space >= Options.
TabSize
)
178
Debug.Assert((indentation / Options.
TabSize
) == result.Tab);
179
Debug.Assert((indentation % Options.
TabSize
) == result.Space);
Microsoft.CodeAnalysis.Features (5)
Wrapping\AbstractCodeActionComputer.cs (1)
111
return desiredIndentation.GetIndentationString(newSourceText, Options.FormattingOptions.UseTabs, Options.FormattingOptions.
TabSize
);
Wrapping\BinaryExpression\BinaryExpressionCodeActionComputer.cs (1)
63
.CreateIndentationString(options.FormattingOptions.UseTabs, options.FormattingOptions.
TabSize
)));
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (1)
88
OriginalSourceText.GetOffset(firstPeriod.SpanStart).CreateIndentationString(options.FormattingOptions.UseTabs, options.FormattingOptions.
TabSize
)));
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (1)
109
var indentString = afterOpenTokenOffset.CreateIndentationString(Options.FormattingOptions.UseTabs, Options.FormattingOptions.
TabSize
);
Wrapping\SyntaxWrappingOptions.cs (1)
27
public int TabSize => FormattingOptions.
TabSize
;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
207
var indentText = amountToIndent.CreateIndentationString(options.FormattingOptions.UseTabs, options.FormattingOptions.
TabSize
);
Microsoft.CodeAnalysis.VisualBasic.Workspaces (11)
Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (2)
119
Dim currentSpaces = text.ConvertTabToSpace(_options.
TabSize
, Me._currentColumn, text.Length)
221
ShouldFormatDocumentationComment(_indentation, _options.
TabSize
, trivia) Then
Formatting\Engine\Trivia\TriviaDataFactory.ComplexTrivia.vb (1)
26
text.ProcessTextBetweenTokens(Me.TreeInfo, Me.Token1, Me.Options.
TabSize
, lines, spaces)
Formatting\Engine\Trivia\TriviaDataFactory.LineContinuationTrivia.vb (1)
32
builder.AppendIndentationString(Me.Spaces, Me.Options.UseTabs, Me.Options.
TabSize
)
Formatting\Engine\Trivia\TriviaDataFactory.vb (6)
174
Dim initialColumn = If(token1.Kind = 0, 0, Me.TreeInfo.GetOriginalColumn(Me.Options.
TabSize
, token1) + token1.Width)
177
Return textSnippet.ConvertTabToSpace(Me.Options.
TabSize
, initialColumn, textSnippet.Length)
184
Dim indentation = result.Tab * Me.Options.
TabSize
+ result.Space
204
If result.Space >= Me.Options.
TabSize
Then
208
Debug.Assert((indentation \ Options.
TabSize
) = result.Tab)
209
Debug.Assert((indentation Mod Options.
TabSize
) = result.Space)
Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (1)
288
tabSize:=Options.
TabSize
,
Microsoft.CodeAnalysis.Workspaces (14)
AbstractIndentation.Indenter.cs (1)
57
_tabSize = options.FormattingOptions.
TabSize
;
AbstractTriviaDataFactory.FormattedWhitespace.cs (1)
39
builder.AppendIndentationString(Spaces, Options.UseTabs, Options.
TabSize
);
AbstractTriviaFormatter.cs (7)
611
var position = lastText.ConvertTabToSpace(Options.
TabSize
, initialColumn, index);
612
var tokenPosition = lastText.ConvertTabToSpace(Options.
TabSize
, initialColumn, lastText.Length);
788
changes.Add(CreateWhitespace(delta.Spaces.CreateIndentationString(Options.UseTabs, Options.
TabSize
)));
814
sb.AppendIndentationString(delta.Spaces, Options.UseTabs, Options.
TabSize
);
890
spaces: text.ConvertTabToSpace(Options.
TabSize
, lineColumn.With(whitespaceBetween).Column, text.Length),
926
spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.
TabSize
),
932
spaces: text.ConvertTabToSpace(Options.
TabSize
, initialColumn, text.Length),
FormattingContext.cs (1)
101
Options.
TabSize
,
IIndentationService.cs (1)
79
=> GetIndentationString(indentationResult, sourceText, options.UseTabs, options.
TabSize
);
TokenStream.cs (3)
328
length = text.GetTextColumn(_options.
TabSize
, initialColumn: 0);
338
var initialColumn = _treeData.GetOriginalColumn(_options.
TabSize
, token);
339
length = text.ConvertTabToSpace(_options.
TabSize
, initialColumn, text.Length);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Formatter\FormatterTests.cs (1)
140
Assert.Equal(5, formattingOptions.
TabSize
);