Mono.TextEditor.TextEditorData.GetIndentationString C# (CSharp) Method

GetIndentationString() public method

public GetIndentationString ( int lineNumber, int column ) : string
lineNumber int
column int
return string
		public string GetIndentationString (int lineNumber, int column)
		{
			return IndentationTracker.GetIndentationString (lineNumber, column);
		}
		

Same methods

TextEditorData::GetIndentationString ( Mono.TextEditor.DocumentLocation loc ) : string
TextEditorData::GetIndentationString ( int offset ) : string

Usage Example

Exemplo n.º 1
0
        public int GetVisualColumn(TextEditorData editor, int logicalColumn)
        {
            int result = 1;
            int offset = Offset;

            if (editor.Options.IndentStyle == IndentStyle.Virtual && Length == 0 && logicalColumn > DocumentLocation.MinColumn)
            {
                foreach (char ch in editor.GetIndentationString(Offset))
                {
                    if (ch == '\t')
                    {
                        result += editor.Options.TabSize;
                        continue;
                    }
                    result++;
                }
                return(result);
            }
            for (int i = 0; i < logicalColumn - 1; i++)
            {
                if (i < Length && editor.Document.GetCharAt(offset + i) == '\t')
                {
                    result = TextViewMargin.GetNextTabstop(editor, result);
                }
                else
                {
                    result++;
                }
            }
            return(result);
        }
All Usage Examples Of Mono.TextEditor.TextEditorData::GetIndentationString