C# Class ICSharpCode.NRefactory.CSharp.CSharpIndentEngine

Indentation engine based on a state machine. Supports only pushing new chars to the end.
Represents the context for transitions between IndentState. Delegates the responsibility for pushing a new char to the current state and changes between states depending on the pushed chars.
Inheritance: IStateMachineIndentEngine
Datei anzeigen Open project: 0xd4d/NRefactory Class Usage Examples

Public Methods

Method Description
CSharpIndentEngine ( CSharpIndentEngine prototype ) : ICSharpCode.NRefactory.Editor

Creates a new CSharpIndentEngine instance from the given prototype.

CSharpIndentEngine ( IDocument document, ICSharpCode.NRefactory.CSharp.TextEditorOptions textEditorOptions, CSharpFormattingOptions formattingOptions ) : ICSharpCode.NRefactory.Editor

Creates a new CSharpIndentEngine instance.

Clone ( ) : IStateMachineIndentEngine
DefineSymbol ( string defineSymbol ) : void

Defines the conditional symbol.

Push ( char ch ) : void
RemoveSymbol ( string undefineSymbol ) : void

Removes the symbol.

Reset ( ) : void
Update ( int offset ) : void

Private Methods

Method Description
ICloneable ( ) : object
IDocumentIndentEngine ( ) : IDocumentIndentEngine

Method Details

CSharpIndentEngine() public method

Creates a new CSharpIndentEngine instance from the given prototype.
public CSharpIndentEngine ( CSharpIndentEngine prototype ) : ICSharpCode.NRefactory.Editor
prototype CSharpIndentEngine /// An CSharpIndentEngine instance. ///
return ICSharpCode.NRefactory.Editor

CSharpIndentEngine() public method

Creates a new CSharpIndentEngine instance.
public CSharpIndentEngine ( IDocument document, ICSharpCode.NRefactory.CSharp.TextEditorOptions textEditorOptions, CSharpFormattingOptions formattingOptions ) : ICSharpCode.NRefactory.Editor
document IDocument /// An instance of which is being parsed. ///
textEditorOptions ICSharpCode.NRefactory.CSharp.TextEditorOptions /// Text editor options for indentation. ///
formattingOptions CSharpFormattingOptions /// C# formatting options. ///
return ICSharpCode.NRefactory.Editor

Clone() public method

public Clone ( ) : IStateMachineIndentEngine
return IStateMachineIndentEngine

DefineSymbol() public method

Defines the conditional symbol.
public DefineSymbol ( string defineSymbol ) : void
defineSymbol string The symbol to define.
return void

Push() public method

public Push ( char ch ) : void
ch char
return void

RemoveSymbol() public method

Removes the symbol.
public RemoveSymbol ( string undefineSymbol ) : void
undefineSymbol string The symbol to undefine.
return void

Reset() public method

public Reset ( ) : void
return void

Update() public method

public Update ( int offset ) : void
offset int
return void