static XmlExpandSelectionAnnotation GetAnnotation(MonoDevelop.Ide.Editor.TextEditor editor, Func <XmlParser> getTreeParser)
        {
            var result = editor.Annotation <XmlExpandSelectionAnnotation> ();

            if (result == null)
            {
                result = new XmlExpandSelectionAnnotation(editor, getTreeParser());
                editor.AddAnnotation(result);
            }
            return(result);
        }