2
// TextEditorOptions.cs
5
// Mike Krüger <mkrueger@xamarin.com>
7
// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to deal
11
// in the Software without restriction, including without limitation the rights
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
// copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
namespace ICSharpCode.NRefactory.CSharp
32
/// The text editor options class holds basic information about the text editor settings that influences code generation and formatting beside
33
/// the CSharpFormattingOptions.
35
public class TextEditorOptions
37
public static readonly TextEditorOptions Default = new TextEditorOptions ();
40
/// Gets or sets a value indicating if tabs need to be replaced by spaces. If that is true, all indenting will be done with spaces only,
41
/// otherwise the indenting will start with tabs.
43
public bool TabsToSpaces {
49
/// Gets or sets the size of the tab chacter as spaces.
57
/// Gets or sets the size of a single indent as spaces.
59
public int IndentSize {
65
/// Gets or sets the continuation indent. A continuation indent is the indent that will be put after an embedded statement that is no block.
67
public int ContinuationIndent {
73
/// Gets or sets the label indent. A label indent is the indent that will be put before an label.
74
/// (Note: it may be negative -IndentSize would cause that labels are unindented)
76
public int LabelIndent {
82
/// Gets or sets the eol marker.
84
public string EolMarker {
90
/// If true blank lines will be indented up to the indent level, otherwise blank lines will have the length 0.
92
public bool IndentBlankLines {
98
/// Gets or sets the length of the desired line length. The formatting engine will wrap at wrap points set to Wrapping.WrapIfTooLong if the line length is too long.
99
/// 0 means do not wrap.
101
public int WrapLineLength {
106
public TextEditorOptions()
108
TabsToSpaces = false;
111
ContinuationIndent = 4;
113
EolMarker = Environment.NewLine;