VS2008에서 메서드를 설명을 위해 작성한 매크로입니다.
Sub MethodDesc()
Dim time As Date
DTE.ActiveDocument.Selection.Text = "/**"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.Text = "@brief"
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@author BHK"
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@date " + Now().ToString()
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@param "
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@return "
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(1)
DTE.ActiveDocument.Selection.CharLeft()
DTE.ActiveDocument.Selection.Text = "**/"
End Sub
-- 결과 --
/**
@brief
@author BHK
@date 2009-03-27 오후 5:34:18
@param
@return
**/
Sub MethodDesc()
Dim time As Date
DTE.ActiveDocument.Selection.Text = "/**"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.Text = "@brief"
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@author BHK"
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@date " + Now().ToString()
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@param "
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(2)
DTE.ActiveDocument.Selection.Text = "@return "
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.NewLine(1)
DTE.ActiveDocument.Selection.CharLeft()
DTE.ActiveDocument.Selection.Text = "**/"
End Sub
-- 결과 --
/**
@brief
@author BHK
@date 2009-03-27 오후 5:34:18
@param
@return
**/
댓글
댓글 쓰기