1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.AvalonEdit.Snippets;
6
using ICSharpCode.SharpDevelop.Editor.AvalonEdit;
8
namespace ICSharpCode.AvalonEdit.AddIn.Snippets
10
public class AnchorSnippetElementProvider : ISnippetElementProvider
12
public SnippetElement GetElement(SnippetInfo snippetInfo)
14
int typeSeparator = snippetInfo.Tag.IndexOf(':');
16
if (typeSeparator > 0) {
17
string type = snippetInfo.Tag.Substring(0, typeSeparator);
18
string name = snippetInfo.Tag.Substring(typeSeparator + 1);
20
if ("anchor".Equals(type, StringComparison.OrdinalIgnoreCase))
21
return new SnippetAnchorElement(name);