I was able to create macros for functions, classes, and etc, but RoutedEvent is giving me trouble. For example my class header macro read as..
Public
Sub CreateClassHeader() Dim caretPosition As TextPoint = DTE.ActiveDocument.Selection.ActivePoint() Dim element As CodeElement = caretPosition.CodeElement(vsCMElement.vsCMElementClass) If Not element Is Nothing Then Dim doc As XmlDocument = New XmlDocument Dim xmlStr As String = "doc.AppendChild(rootTag)
If doc.SelectSingleNode("/doc/Class") Is Nothing ThenHeaderBegin(doc)
' Class name Dim nameTag As XmlElement = doc.CreateElement("Class")nameTag.SetAttribute(
"Class_Name", "")nameTag.AppendChild(doc.CreateTextNode(element.Name))
doc.FirstChild.AppendChild(nameTag)
' DescriptionClassDescriptiontag(doc)
HeaderEnd(doc)
SetCommentXml(element, doc)
End If ElseMsgBox(
"Selection Not Found! Place cursor at the beginning of the class declaration.") End If Exit Sub End Sub
But I can't seem to figure out how to create a header macro for something like..
public static readonly RoutedEvent AcceptRequiredChangedEvent;
any help would be appreciated, thanks
Replies
Know the answer? Post it — somebody with the same question will find it here.