C# Class EditorConfig.VisualStudio.Logic.Cleaning.CodeCleanupManager

A manager class for cleaning up code.
Mostra file Open project: editorconfig/editorconfig-visualstudio Class Usage Examples

Private Methods

Method Description
Cleanup ( Document document, ITextBuffer textBuffer ) : void

Attempts to run code cleanup on the specified document.

CodeCleanupManager ( EditorConfigPackage package ) : System

Initializes a new instance of the CodeCleanupManager class.

FixDocumentCharset ( ITextDocument document, Charset charset ) : void
FixLineEndings ( ITextSnapshot snapshot, ITextEdit edit, string eol ) : void

Enforce line endings to follow the rules defined in the EditorConfig file.

GetInstance ( EditorConfigPackage package ) : CodeCleanupManager

Gets an instance of the CodeCleanupManager class.

InsertFinalNewline ( ITextSnapshot snapshot, ITextEdit edit, string eol ) : void

Inserts a newline at the end of the file, if it doesn't already exist.

RunCodeCleanupGeneric ( Document document, ITextBuffer textBuffer ) : void

Attempts to run code cleanup on the specified generic document.

TrimTrailingWhitespace ( ITextSnapshot snapshot, ITextEdit edit ) : void