|
|
|
@ -177,17 +177,17 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
@@ -177,17 +177,17 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
|
|
|
|
|
CorrectFormatting (null, newNode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void Link (params AstNode[] nodes) |
|
|
|
|
{ |
|
|
|
|
Link(null, nodes); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public virtual void Link (Action continuation, params AstNode[] nodes) |
|
|
|
|
public virtual Task Link (params AstNode[] nodes) |
|
|
|
|
{ |
|
|
|
|
// Default implementation: do nothing
|
|
|
|
|
// Derived classes are supposed to enter the text editor's linked state.
|
|
|
|
|
|
|
|
|
|
// Immediately signal the task as completed:
|
|
|
|
|
var tcs = new TaskCompletionSource<object>(); |
|
|
|
|
tcs.SetResult(null); |
|
|
|
|
return tcs.Task; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void Replace (AstNode node, AstNode replaceWith) |
|
|
|
|
{ |
|
|
|
|
var segment = GetSegment (node); |
|
|
|
@ -238,36 +238,26 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
@@ -238,36 +238,26 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
|
|
|
|
|
End |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public virtual void InsertWithCursor(string operation, InsertPosition defaultPosition, IEnumerable<AstNode> node, Action continuation = null) |
|
|
|
|
public virtual Task InsertWithCursor(string operation, InsertPosition defaultPosition, IEnumerable<AstNode> node) |
|
|
|
|
{ |
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public virtual void InsertWithCursor(string operation, ITypeDefinition parentType, IEnumerable<AstNode> node, Action continuation = null) |
|
|
|
|
public virtual Task InsertWithCursor(string operation, ITypeDefinition parentType, IEnumerable<AstNode> node) |
|
|
|
|
{ |
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void InsertWithCursor(string operation, InsertPosition defaultPosition, params AstNode[] nodes) |
|
|
|
|
{ |
|
|
|
|
InsertWithCursor(operation, defaultPosition, (IEnumerable<AstNode>)nodes, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void InsertWithCursor(string operation, ITypeDefinition parentType, params AstNode[] nodes) |
|
|
|
|
{ |
|
|
|
|
InsertWithCursor(operation, parentType, (IEnumerable<AstNode>)nodes, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void InsertWithCursor(string operation, InsertPosition defaultPosition, Action continuation, params AstNode[] nodes) |
|
|
|
|
public Task InsertWithCursor(string operation, InsertPosition defaultPosition, params AstNode[] nodes) |
|
|
|
|
{ |
|
|
|
|
InsertWithCursor(operation, defaultPosition, (IEnumerable<AstNode>)nodes, continuation); |
|
|
|
|
return InsertWithCursor(operation, defaultPosition, (IEnumerable<AstNode>)nodes); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void InsertWithCursor(string operation, ITypeDefinition parentType, Action continuation, params AstNode[] nodes) |
|
|
|
|
|
|
|
|
|
public Task InsertWithCursor(string operation, ITypeDefinition parentType, params AstNode[] nodes) |
|
|
|
|
{ |
|
|
|
|
InsertWithCursor(operation, parentType, (IEnumerable<AstNode>)nodes, continuation); |
|
|
|
|
return InsertWithCursor(operation, parentType, (IEnumerable<AstNode>)nodes); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual int GetIndentLevelAt (int offset) |
|
|
|
|
{ |
|
|
|
|
return 0; |
|
|
|
|