private void AddNextIndentBlockOperations(List <IndentBlockOperation> list, SyntaxNode node, OptionSet optionSet, NextAction <IndentBlockOperation> nextOperation) { if (this.vbHelperFormattingRule == null) { base.AddIndentBlockOperations(list, node, optionSet, nextOperation); return; } vbHelperFormattingRule.AddIndentBlockOperations(list, node, optionSet, nextOperation); }
public override void AddIndentBlockOperations(List <IndentBlockOperation> list, SyntaxNode node, OptionSet optionSet, NextAction <IndentBlockOperation> nextOperation) { // for the common node itself, return absolute indentation if (this.commonNode == node) { // TODO: If the first line of the span includes a node, we want to align with the position of that node // in the primary buffer. That's what Dev12 does for C#, but it doesn't match Roslyn's current model // of each statement being formatted independently with respect to it's parent. list.Add(new IndentBlockOperation(token1, token2, span, baseIndentation, IndentBlockOption.AbsolutePosition)); } else if (node.Span.Contains(this.span)) { // any node bigger than our span is ignored. return; } // Add everything to the list. AddNextIndentBlockOperations(list, node, optionSet, nextOperation); // Filter out everything that encompasses our span. AdjustIndentBlockOperation(list); }