Method | Description | |
---|---|---|
AddAttribute ( EntityDeclaration entity, AttributeSection attr ) : void |
Adds an attribute section to a given entity.
|
|
AddTo ( BlockStatement bodyStatement, AstNode newNode ) : void | ||
AddTo ( TypeDeclaration typeDecl, EntityDeclaration entityDecl ) : void | ||
ChangeBaseTypes ( TypeDeclaration type, IEnumerable |
Changes the base types of a type declaration.
|
|
ChangeModifier ( EntityDeclaration entity, Modifiers modifiers ) : void |
Changes the modifier of a given entity declaration.
|
|
ChangeModifier ( ParameterDeclaration param, ParameterModifier modifier ) : void | ||
CreateNewType ( AstNode newType, NewTypeContext context = NewTypeContext.CurrentNamespace ) : void |
Creates a new file containing the type, namespace and correct usings. (Note: Should take care of IDE specific things, file headers, add to project, correct name).
|
|
Dispose ( ) : void | ||
DoGlobalOperationOn ( IEnumerable |
||
FormatText ( ) : void | ||
FormatText ( IEnumerable |
||
GetCurrentOffset ( TextLocation originalDocumentLocation ) : int |
Given an offset in the original document (at the start of script execution), returns the offset in the current document.
|
|
GetCurrentOffset ( int originalDocumentOffset ) : int |
Given an offset in the original document (at the start of script execution), returns the offset in the current document.
|
|
GetSegment ( AstNode node ) : ISegment |
Gets the current text segment of the specified AstNode.
|
|
InsertAfter ( AstNode node, AstNode newNode ) : void | ||
InsertBefore ( AstNode node, AstNode newNode ) : void | ||
InsertText ( int offset, string newText ) : void | ||
InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func |
||
InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func nodeCallback ) : Task | ||
InsertWithCursor ( string operation, InsertPosition defaultPosition ) : Task | ||
InsertWithCursor ( string operation, InsertPosition defaultPosition, IList |
||
Link ( ) : System.Threading.Tasks.Task | ||
Link ( IEnumerable |
||
Remove ( AstNode node, bool removeEmptyLine = true ) : void | ||
RemoveAttribute ( |
Safely removes an attribue from it's section (removes empty sections).
|
|
RemoveText ( int offset, int length ) : void | ||
Rename ( ISymbol symbol, string name = null ) : void |
Renames the specified symbol.
|
|
Replace ( AstNode node, AstNode replaceWith ) : void | ||
Replace ( int offset, int length, string newText ) : void |
Replaces text.
|
|
Select ( AstNode node ) : void | ||
Select ( TextLocation start, TextLocation end ) : void | ||
Select ( int startOffset, int endOffset ) : void |
Method | Description | |
---|---|---|
CreateTrackedSegment ( int offset, int length ) : ISegment |
Creates a tracked segment for the specified (offset,length)-segment. Offset is interpreted to be an offset in the current document.
|
|
GetIndentLevelAt ( int offset ) : int | ||
OutputNode ( int indentLevel, AstNode node, bool startWithNewLine = false ) : ICSharpCode.NRefactory.CSharp.Refactoring.NodeOutput | ||
Script ( CSharpFormattingOptions formattingOptions, TextEditorOptions options ) : System |
Method | Description | |
---|---|---|
CorrectFormatting ( AstNode node, AstNode newNode ) : void | ||
DoesInsertingAfterRequireNewline ( AstNode node ) : bool | ||
IndentLevelFor ( AstNode node ) : int | ||
PrefixFor ( AstNode node, AstNode newNode ) : string |
public AddAttribute ( EntityDeclaration entity, AttributeSection attr ) : void | ||
entity | EntityDeclaration | The entity to add the attribute to. |
attr | AttributeSection | The attribute to add. |
return | void |
public AddTo ( BlockStatement bodyStatement, AstNode newNode ) : void | ||
bodyStatement | BlockStatement | |
newNode | AstNode | |
return | void |
public AddTo ( TypeDeclaration typeDecl, EntityDeclaration entityDecl ) : void | ||
typeDecl | TypeDeclaration | |
entityDecl | EntityDeclaration | |
return | void |
public ChangeBaseTypes ( TypeDeclaration type, IEnumerable |
||
type | TypeDeclaration | The type declaration to modify. |
baseTypes | IEnumerable |
The new base types. |
return | void |
public ChangeModifier ( EntityDeclaration entity, Modifiers modifiers ) : void | ||
entity | EntityDeclaration | The entity. |
modifiers | Modifiers | The new modifiers. |
return | void |
public ChangeModifier ( ParameterDeclaration param, ParameterModifier modifier ) : void | ||
param | ParameterDeclaration | |
modifier | ParameterModifier | |
return | void |
public CreateNewType ( AstNode newType, NewTypeContext context = NewTypeContext.CurrentNamespace ) : void | ||
newType | AstNode | /// New type to be created. /// |
context | NewTypeContext | /// The Context in which the new type should be created. /// |
return | void |
protected abstract CreateTrackedSegment ( int offset, int length ) : ISegment | ||
offset | int | |
length | int | |
return | ISegment |
public DoGlobalOperationOn ( IEnumerable |
||
entities | IEnumerable |
|
callback | Action |
|
operationDescription | string | |
return | void |
public abstract FormatText ( IEnumerable |
||
nodes | IEnumerable |
|
return | void |
public abstract GetCurrentOffset ( TextLocation originalDocumentLocation ) : int | ||
originalDocumentLocation | TextLocation | |
return | int |
public abstract GetCurrentOffset ( int originalDocumentOffset ) : int | ||
originalDocumentOffset | int | |
return | int |
protected GetIndentLevelAt ( int offset ) : int | ||
offset | int | |
return | int |
public GetSegment ( AstNode node ) : ISegment | ||
node | AstNode | The node to get the segment for. |
return | ISegment |
public InsertAfter ( AstNode node, AstNode newNode ) : void | ||
node | AstNode | |
newNode | AstNode | |
return | void |
public InsertBefore ( AstNode node, AstNode newNode ) : void | ||
node | AstNode | |
newNode | AstNode | |
return | void |
public InsertText ( int offset, string newText ) : void | ||
offset | int | |
newText | string | |
return | void |
public InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func |
||
operation | string | |
parentType | ICSharpCode.NRefactory.TypeSystem.ITypeDefinition | |
nodeCallback | Func |
|
return | Task |
public InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func nodeCallback ) : Task | ||
operation | string | |
parentType | ICSharpCode.NRefactory.TypeSystem.ITypeDefinition | |
nodeCallback | Func | |
return | Task |
public InsertWithCursor ( string operation, InsertPosition defaultPosition ) : Task | ||
operation | string | |
defaultPosition | InsertPosition | |
return | Task |
public InsertWithCursor ( string operation, InsertPosition defaultPosition, IList |
||
operation | string | |
defaultPosition | InsertPosition | |
nodes | IList |
|
return | Task |
public Link ( ) : System.Threading.Tasks.Task | ||
return | System.Threading.Tasks.Task |
public Link ( IEnumerable |
||
nodes | IEnumerable |
|
return | System.Threading.Tasks.Task |
protected OutputNode ( int indentLevel, AstNode node, bool startWithNewLine = false ) : ICSharpCode.NRefactory.CSharp.Refactoring.NodeOutput | ||
indentLevel | int | |
node | AstNode | |
startWithNewLine | bool | |
return | ICSharpCode.NRefactory.CSharp.Refactoring.NodeOutput |
public abstract Remove ( AstNode node, bool removeEmptyLine = true ) : void | ||
node | AstNode | |
removeEmptyLine | bool | |
return | void |
public RemoveAttribute ( |
||
attr | The attribute to be removed. | |
return | void |
public RemoveText ( int offset, int length ) : void | ||
offset | int | |
length | int | |
return | void |
public Rename ( ISymbol symbol, string name = null ) : void | ||
symbol | ISymbol | /// The symbol to rename /// |
name | string | /// The new name, if null the user is prompted for a new name. /// |
return | void |
public Replace ( AstNode node, AstNode replaceWith ) : void | ||
node | AstNode | |
replaceWith | AstNode | |
return | void |
public abstract Replace ( int offset, int length, string newText ) : void | ||
offset | int | The starting offset of the text to be replaced. |
length | int | The length of the text to be replaced. |
newText | string | The new text. |
return | void |
protected Script ( CSharpFormattingOptions formattingOptions, TextEditorOptions options ) : System | ||
formattingOptions | CSharpFormattingOptions | |
options | TextEditorOptions | |
return | System |
public Select ( TextLocation start, TextLocation end ) : void | ||
start | TextLocation | |
end | TextLocation | |
return | void |
public Select ( int startOffset, int endOffset ) : void | ||
startOffset | int | |
endOffset | int | |
return | void |