|
|
|
@ -28,6 +28,7 @@ using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.IO; |
|
|
|
using ICSharpCode.NRefactory.Editor; |
|
|
|
using ICSharpCode.NRefactory.Editor; |
|
|
|
using ICSharpCode.NRefactory.TypeSystem; |
|
|
|
using ICSharpCode.NRefactory.TypeSystem; |
|
|
|
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.NRefactory.CSharp.Refactoring |
|
|
|
namespace ICSharpCode.NRefactory.CSharp.Refactoring |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -161,10 +162,11 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring |
|
|
|
output.RegisterTrackedSegments(this, startOffset); |
|
|
|
output.RegisterTrackedSegments(this, startOffset); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual void Link (params AstNode[] nodes) |
|
|
|
public virtual Task Link (params AstNode[] nodes) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Default implementation: do nothing
|
|
|
|
// Default implementation: do nothing
|
|
|
|
// Derived classes are supposed to enter the text editor's linked state.
|
|
|
|
// Derived classes are supposed to enter the text editor's linked state.
|
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Replace (AstNode node, AstNode replaceWith) |
|
|
|
public void Replace (AstNode node, AstNode replaceWith) |
|
|
|
@ -198,24 +200,24 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring |
|
|
|
End |
|
|
|
End |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual void InsertWithCursor(string operation, InsertPosition defaultPosition, IEnumerable<AstNode> node) |
|
|
|
public virtual Task InsertWithCursor(string operation, InsertPosition defaultPosition, IEnumerable<AstNode> node) |
|
|
|
{ |
|
|
|
{ |
|
|
|
throw new NotImplementedException(); |
|
|
|
throw new NotImplementedException(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual void InsertWithCursor(string operation, ITypeDefinition parentType, IEnumerable<AstNode> node) |
|
|
|
public virtual Task InsertWithCursor(string operation, ITypeDefinition parentType, IEnumerable<AstNode> node) |
|
|
|
{ |
|
|
|
{ |
|
|
|
throw new NotImplementedException(); |
|
|
|
throw new NotImplementedException(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void InsertWithCursor(string operation, InsertPosition defaultPosition, params AstNode[] nodes) |
|
|
|
public Task InsertWithCursor(string operation, InsertPosition defaultPosition, params AstNode[] nodes) |
|
|
|
{ |
|
|
|
{ |
|
|
|
InsertWithCursor(operation, defaultPosition, (IEnumerable<AstNode>)nodes); |
|
|
|
return InsertWithCursor(operation, defaultPosition, (IEnumerable<AstNode>)nodes); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void InsertWithCursor(string operation, ITypeDefinition parentType, params AstNode[] nodes) |
|
|
|
public Task InsertWithCursor(string operation, ITypeDefinition parentType, params AstNode[] nodes) |
|
|
|
{ |
|
|
|
{ |
|
|
|
InsertWithCursor(operation, parentType, (IEnumerable<AstNode>)nodes); |
|
|
|
return InsertWithCursor(operation, parentType, (IEnumerable<AstNode>)nodes); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual int GetIndentLevelAt (int offset) |
|
|
|
protected virtual int GetIndentLevelAt (int offset) |
|
|
|
|