paip.提升用户体验---c++ ide 自动化注释插件的开发...

paip.提升用户体验---c++  ide 自动化注释插件的开发...


作者Attilax ,  EMAIL:1466519819@qq.com 
来源:attilax的专栏
地址:http://blog.csdn.net/attilax


qt 里面,输入 /**{Entr} 可以生成方法注释,不过只包括 * @brief operator <<  * @param str * @return ..但是不能生成文件注释....需要一个宏来完成这个操作..


但是,qt的宏只能生成一个..使用一个..太简单的兰..只好自己插件扩展兰...


插件AtiNote,功能:
1.生成文件头注释   /**f  ,
2.补充方法注释   @x




主要流程.. 
///


 ;#Persistent
;SendInput ,demo 9/29/2013 12:12 PM  2013-09-DD 12:13 PM 2013-09-29 12:13:35
FormatTime, CurrentDateTime,, yyyy-MM-dd HH:mm:ss    ; It will look like 9/1/2005 3:53 PM
;SendInput %CurrentDateTime%
FormatTime, copy_time,, yyyy-MM-dd
$filenote =
(
/**
 @file
@bug  arg timer ,should hook window
@todo heyeug hookwind yaozwl .\n
qt grammahi light c927--http://kate-editor.org/\n
@author  attilax <1466519819@qq.com>
 @date c925 %CurrentDateTime%
  @brief  none_jyedwe_shwamin
 @note      detail note start


\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//\n
\\\     COPYRIGHT NOTICE\n
\\\    Copyright (c) %copy_time%,  ATTILAX\n
\\\    All rights reserved.\n
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/\n
 *  This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option )any later version.


 *
 *SOME DETAIL DESCRIPT  d
*/
)


$title=Qt Creator
$classx= QWidget
;#IfWinActive ahk_class Notepad
;#IfWinActive,Qt Creator
#IfWinActive,ahk_class QWidget
::btw::This replacement text will appear only in Notepad.


::/**f::




SendInput,%$filenote%
;c++ marcro insert file note
return




#IfWinActive,ahk_class QWidget
::@x::
StringReplace, OutputVar, $filenote,  @file ,
StringReplace, OutputVar, OutputVar,  @brief ,
StringReplace, OutputVar, OutputVar, */ ,
StringReplace, OutputVar, OutputVar, /** ,
SendInput,%OutputVar%


return









posted @ 2013-09-29 13:06  attilaxAti  阅读(30)  评论(0编辑  收藏  举报