In This Article

PythonIndentProvider Class

Provides a Python language indent provider service.

public class PythonIndentProvider : DelimiterIndentProvider, IIndentProvider, IEditorDocumentTextChangeEventSink
Inheritance:
object DelimiterIndentProvider object
Implements:
IIndentProvider IEditorDocumentTextChangeEventSink

Constructors

PythonIndentProvider()

Initializes a new instance of the PythonIndentProvider class.

public PythonIndentProvider()

Properties

Mode

Gets the IndentMode that specifies the mode by which to indent text.

public override IndentMode Mode { get; }

Property Value

IndentMode:

The IndentMode that specifies the mode by which to indent text.

Methods

GetIndentAmount(TextSnapshotOffset, int)

Returns the ideal amount of indent, always in columns, for the line containing the snapshot offset.

public override int GetIndentAmount(TextSnapshotOffset snapshotOffset, int defaultAmount)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset whose line should be examined.

defaultAmount int

The default indent amount, which is the amount used in Block mode.

Returns

int:

The ideal amount of indent, always in columns, for the line containing the snapshot offset.

Remarks

This method is called when the IndentMode is Smart. The containing ITextDocument is accessible via the snapshot range's ITextSnapshot.

Inherited Members