public CSharpIndentEngine(IDocument document, TextEditorOptions textEditorOptions, CSharpFormattingOptions formattingOptions) { this.document = document; this.options = formattingOptions; this.textEditorOptions = textEditorOptions; this.indent = new Indent(textEditorOptions); this.thisLineindent = new Indent(textEditorOptions); }
/// <summary> /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.CSharp.CSharpFormatter"/> class. /// </summary> /// <param name="policy">The formatting policy to use.</param> /// <param name="document">The text document to work upon.</param> /// <param name="options">The text editor options (optional). Default is: TextEditorOptions.Default</param> public CSharpFormatter(CSharpFormattingOptions policy, TextEditorOptions options = null) { if (policy == null) { throw new ArgumentNullException("policy"); } this.policy = policy; this.options = options ?? TextEditorOptions.Default; }
public CSharpIndentEngine(IDocument document, TextEditorOptions textEditorOptions, CSharpFormattingOptions formattingOptions) { this.document = document; this.options = formattingOptions; this.textEditorOptions = textEditorOptions; this.indent = new Indent(textEditorOptions); this.indentDelta = new Indent(textEditorOptions); this.thisLineindent = new Indent(textEditorOptions); }
CSharpIndentEngine (CSharpIndentEngine prototype) { this.document = prototype.document; this.options = prototype.options; this.textEditorOptions = prototype.textEditorOptions; this.indent = prototype.indent.Clone(); this.thisLineindent = prototype.thisLineindent.Clone(); this.offset = prototype.offset; this.inside = prototype.inside; this.IsLineStart = prototype.IsLineStart; this.pc = prototype.pc; this.parenStack = new Stack<TextLocation>(prototype.parenStack.Reverse ()); this.currentBody = prototype.currentBody; this.nextBody = prototype.nextBody; this.addContinuation = prototype.addContinuation; this.line = prototype.line; this.col = prototype.col; this.popNextParenBlock = prototype.popNextParenBlock; }
CSharpIndentEngine(CSharpIndentEngine prototype) { this.document = prototype.document; this.options = prototype.options; this.textEditorOptions = prototype.textEditorOptions; this.indent = prototype.indent.Clone(); this.thisLineindent = prototype.thisLineindent.Clone(); this.offset = prototype.offset; this.inside = prototype.inside; this.IsLineStart = prototype.IsLineStart; this.pc = prototype.pc; this.parenStack = new Stack <TextLocation>(prototype.parenStack.Reverse()); this.currentBody = prototype.currentBody; this.nextBody = prototype.nextBody; this.addContinuation = prototype.addContinuation; this.line = prototype.line; this.col = prototype.col; this.popNextParenBlock = prototype.popNextParenBlock; }
Indent(TextEditorOptions options, Stack <IndentType> indentStack, int curIndent) : this(options) { this.indentStack = indentStack; this.curIndent = curIndent; }
public Indent(TextEditorOptions options) { this.options = options; Reset(); }
public AstFormattingVisitor(CSharpFormattingOptions policy, IDocument document, TextEditorOptions options = null) { if (policy == null) { throw new ArgumentNullException("policy"); } if (document == null) { throw new ArgumentNullException("document"); } this.policy = policy; this.document = document; this.options = options ?? TextEditorOptions.Default; curIndent = new Indent(this.options); }