|
|
|
|
@ -154,22 +154,6 @@ namespace ICSharpCode.NRefactory.CSharp
@@ -154,22 +154,6 @@ namespace ICSharpCode.NRefactory.CSharp
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns true, if the given coordinates are in the node.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool IsInside (TextLocation location) |
|
|
|
|
{ |
|
|
|
|
return StartLocation <= location && location <= EndLocation; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns true, if the given coordinates (line, column) are in the node.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool IsInside(int line, int column) |
|
|
|
|
{ |
|
|
|
|
return IsInside(new TextLocation (line, column)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the region from StartLocation to EndLocation for this node.
|
|
|
|
|
/// The file name of the region is set based on the parent CompilationUnit's file name.
|
|
|
|
|
@ -663,14 +647,26 @@ namespace ICSharpCode.NRefactory.CSharp
@@ -663,14 +647,26 @@ namespace ICSharpCode.NRefactory.CSharp
|
|
|
|
|
return w.ToString (); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns true, if the given coordinates (line, column) are in the node.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>
|
|
|
|
|
/// True, if the given coordinates are between StartLocation and EndLocation (inclusive); otherwise, false.
|
|
|
|
|
/// </returns>
|
|
|
|
|
public bool Contains (int line, int column) |
|
|
|
|
{ |
|
|
|
|
return Contains (new TextLocation (line, column)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns true, if the given coordinates are in the node.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>
|
|
|
|
|
/// True, if location is between StartLocation and EndLocation (inclusive); otherwise, false.
|
|
|
|
|
/// </returns>
|
|
|
|
|
public bool Contains (TextLocation location) |
|
|
|
|
{ |
|
|
|
|
return this.StartLocation <= location && location < this.EndLocation; |
|
|
|
|
return this.StartLocation <= location && location <= this.EndLocation; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override void AddAnnotation (object annotation) |
|
|
|
|
|