12 references to FormattingRangeHelper
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (4)
162
if (
FormattingRangeHelper
.AreTwoTokensOnSameLine(statement.GetFirstToken(), statement.GetLastToken()))
174
if (!
FormattingRangeHelper
.AreTwoTokensOnSameLine(statement.GetFirstToken(), lastTokenBeforeEmbeddedStatement))
186
if (!
FormattingRangeHelper
.AreTwoTokensOnSameLine(embeddedStatement.GetFirstToken(), embeddedStatement.GetLastToken()))
216
if (!
FormattingRangeHelper
.AreTwoTokensOnSameLine(firstTokenAfterEmbeddedStatement, statement.GetLastToken()))
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Formatting\CSharpSyntaxFormattingService.cs (1)
162
var tokenRange =
FormattingRangeHelper
.FindAppropriateRange(endToken);
Formatting\TypingFormattingRule.cs (1)
84
if (
FormattingRangeHelper
.AreTwoTokensOnSameLine(firstTokenOfNode, firstStatement.GetFirstToken()))
Simplification\Reducers\CSharpMiscellaneousReducer.cs (2)
154
if (!
FormattingRangeHelper
.AreTwoTokensOnSameLine(node.Statements[0].GetFirstToken(), node.Statements[0].GetLastToken()))
160
if (!
FormattingRangeHelper
.AreTwoTokensOnSameLine(node.Parent.GetFirstToken(), node.GetFirstToken().GetPreviousToken()))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
353
=>
FormattingRangeHelper
.IsColonInSwitchLabel(token);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (3)
196
if (!
FormattingRangeHelper
.InBetweenTwoMembers(previousToken, currentToken))
201
var previousMember =
FormattingRangeHelper
.GetEnclosingMember(previousToken);
202
var nextMember =
FormattingRangeHelper
.GetEnclosingMember(currentToken);