diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs index 984f03a4dc..befbf505d3 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs @@ -92,6 +92,9 @@ namespace ICSharpCode.AvalonEdit.Snippets AnchorSegment wholeSnippetAnchor; bool deactivateIfSnippetEmpty; + /// + /// Gets the start position of the snippet insertion. + /// public int StartPosition { get { if (wholeSnippetAnchor != null) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs index 111e0bfcab..53edc37851 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs @@ -10,17 +10,25 @@ using ICSharpCode.AvalonEdit.Document; namespace ICSharpCode.AvalonEdit.Snippets { + /// + /// Creates a named anchor that can be accessed by other SnippetElements. + /// public sealed class SnippetAnchorElement : SnippetElement { - string textToInsert = ""; - + /// + /// Gets or sets the name of the anchor. + /// public string Name { get; private set; } + /// + /// Creates a SnippetAnchorElement with the supplied name. + /// public SnippetAnchorElement(string name) { this.Name = name; } + /// public override void Insert(InsertionContext context) { int start = context.InsertionPosition; @@ -29,8 +37,12 @@ namespace ICSharpCode.AvalonEdit.Snippets } } + /// + /// AnchorElement created by SnippetAnchorElement. + /// public sealed class AnchorElement : IActiveElement { + /// public bool IsEditable { get { return false; } } @@ -38,10 +50,14 @@ namespace ICSharpCode.AvalonEdit.Snippets AnchorSegment segment; InsertionContext context; + /// public ISegment Segment { get { return segment; } } + /// + /// Creates a new AnchorElement. + /// public AnchorElement(AnchorSegment segment, string text, string name, InsertionContext context) { this.segment = segment; @@ -50,6 +66,9 @@ namespace ICSharpCode.AvalonEdit.Snippets this.Name = name; } + /// + /// Gets or sets the text at the anchor. + /// public string Text { get { return context.Document.GetText(segment); } set { @@ -63,12 +82,17 @@ namespace ICSharpCode.AvalonEdit.Snippets } } + /// + /// Gets or sets the name of the anchor. + /// public string Name { get; private set; } + /// public void OnInsertionCompleted() { } + /// public void Deactivate(SnippetEventArgs e) { }