Browse Source

Add InsertAfter/InsertBefore to AstNodeCollection.

newNRvisualizers
Daniel Grunwald 15 years ago
parent
commit
5660677750
  1. 10
      ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs
  2. 2
      ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
  3. 4
      ICSharpCode.NRefactory/TypeSystem/ITypeResolveContext.cs

10
ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs

@ -193,5 +193,15 @@ namespace ICSharpCode.NRefactory.CSharp
} }
return false; return false;
} }
public void InsertAfter(T existingItem, T newItem)
{
node.InsertChildAfter(existingItem, newItem, role);
}
public void InsertBefore(T existingItem, T newItem)
{
node.InsertChildBefore(existingItem, newItem, role);
}
} }
} }

2
ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
public bool IncludeInternalMembers { get; set; } public bool IncludeInternalMembers { get; set; }
/// <summary> /// <summary>
/// Gets/Sets the documentation provider that is used to retrive the XML documentation for all members. /// Gets/Sets the documentation provider that is used to retrieve the XML documentation for all members.
/// </summary> /// </summary>
public IDocumentationProvider DocumentationProvider { get; set; } public IDocumentationProvider DocumentationProvider { get; set; }

4
ICSharpCode.NRefactory/TypeSystem/ITypeResolveContext.cs

@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <param name="nameComparer">Language-specific rules for how namespace names are compared</param> /// <param name="nameComparer">Language-specific rules for how namespace names are compared</param>
/// <returns>List of classes within that namespace.</returns> /// <returns>List of classes within that namespace.</returns>
/// <remarks> /// <remarks>
/// If this method is called within <c>using (pc.Synchronize())</c>, then the returned enumerable is valid /// If this method is called within <c>using (var spc = pc.Synchronize())</c>, then the returned enumerable is valid
/// only until the end of the synchronize block. /// only until the end of the synchronize block.
/// </remarks> /// </remarks>
IEnumerable<ITypeDefinition> GetClasses(string nameSpace, StringComparer nameComparer); IEnumerable<ITypeDefinition> GetClasses(string nameSpace, StringComparer nameComparer);
@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// Retrieves all namespaces. /// Retrieves all namespaces.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If this method is called within <c>using (pc.Synchronize())</c>, then the returned enumerable is valid /// If this method is called within <c>using (var spc = pc.Synchronize())</c>, then the returned enumerable is valid
/// only until the end of the synchronize block. /// only until the end of the synchronize block.
/// </remarks> /// </remarks>
IEnumerable<string> GetNamespaces(); IEnumerable<string> GetNamespaces();

Loading…
Cancel
Save