/// <summary> /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.Al.AlFormatter"/> class. /// </summary> /// <param name="policy">The formatting policy to use.</param> /// <param name="options">The text editor options (optional). Default is: TextEditorOptions.Default</param> public AlFormatter(AlFormattingOptions policy, TextEditorOptions options = null) { if (policy == null) { throw new ArgumentNullException("policy"); } this.policy = policy; this.options = options ?? TextEditorOptions.Default; }
/// <summary> /// Creates a new AlIndentEngine instance. /// </summary> /// <param name="document"> /// An instance of <see cref="IDocument"/> which is being parsed. /// </param> /// <param name="formattingOptions"> /// C# formatting options. /// </param> /// <param name="textEditorOptions"> /// Text editor options for indentation. /// </param> public AlIndentEngine(IDocument document, TextEditorOptions textEditorOptions, AlFormattingOptions formattingOptions) { this.formattingOptions = formattingOptions; this.textEditorOptions = textEditorOptions; this.document = document; this.currentState = new GlobalBodyState(this); this.conditionalSymbols = new HashSet <string>(); this.customConditionalSymbols = new HashSet <string>(); this.wordToken = new StringBuilder(); this.previousKeyword = string.Empty; this.newLineChar = textEditorOptions.EolMarker[0]; }
public ConstructFixer(AlFormattingOptions options, TextEditorOptions textEditorOptions) { this.options = options; this.textEditorOptions = textEditorOptions; }
public Indent(TextEditorOptions options) { this.options = options; Reset(); }