JavaScriptTextFormatter Class
Provides a JavaScript language text formatter service.
public class JavaScriptTextFormatter : ITextFormatter
- Inheritance:
- object object
- Implements:
- ITextFormatter
Constructors
JavaScriptTextFormatter()
Initializes an instance of the class.
public JavaScriptTextFormatter()
Properties
IsOpeningBraceOnNewLine
Indicates whether opening braces are on new lines.
Methods
Format(ITextSnapshot, ITextPositionRangeCollection, TextFormatMode)
Applies text formatting to part or all of a snapshot.
public void Format(ITextSnapshot snapshot, ITextPositionRangeCollection selectionPositionRanges, TextFormatMode mode = TextFormatMode.Ranges)
| Parameter | Type | Description |
|---|---|---|
| snapshot | ITextSnapshot | The target ITextSnapshot. |
| selectionPositionRanges | ITextPositionRangeCollection | The ITextPositionRangeCollection indicating the selection position ranges. These are used to translate the current selection to the new snapshot that is created, even when formatting the entire snapshot. |
| mode | TextFormatMode | A TextFormatMode indicating whether to format part or all of the snapshot. The default value is |
Remarks
The containing ITextDocument is accessible via the ITextSnapshot.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()