vs自动注释add-in插件编写(二)--CConnect
来源:互联网 发布:广联达软件百度云 编辑:程序博客网 时间:2024/05/24 04:36
void CConnect::EditCode(CComQIPtr<TextSelection> pTextSelection, COMMENT_TYPE ct){if (pTextSelection){CComPtr<UndoContext> pUndoContext;m_pDTE->get_UndoContext(&pUndoContext);pUndoContext->Open(CComBSTR("Edit code"), VARIANT_FALSE);CComBSTR strSelectText;pTextSelection->get_Text(&strSelectText);long lCol;CComPtr<VirtualPoint> pVirtualPoint;pTextSelection->get_TopPoint(&pVirtualPoint);pVirtualPoint->get_VirtualDisplayColumn(&lCol);// 注释头CString strFinalText = CommentCode(GetCommentHead(), lCol - 1) + "\n";// 补齐第一行strFinalText = LeftTabToSpace(strFinalText, 4);strFinalText = strFinalText.Mid(lCol - 1, strFinalText.GetLength() - lCol + 1);// 正文CString strTemp;strTemp = strSelectText;// 补齐第一行正文strTemp = GetTabString(lCol -1, 4) + strTemp;if (ct != CT_ADD_CODE){strTemp = CommentCode(strTemp, lCol - 1) + "\n";}strFinalText += strTemp;// 注释尾strFinalText += "\n" + CommentCode(GetCommentTail(), lCol - 1);InsertText(pTextSelection, strFinalText);pUndoContext->Close();}}
0 0
- vs自动注释add-in插件编写(二)--CConnect
- vs自动注释add-in插件编写(一)--辅助函数
- Xcode函数自动注释插件(类似VS的函数自动注释)
- 编写VS.NET的Add-in帮助程序调试
- VS add-in sample
- VS 2008 可扩展性开发(二):Macro和Add-In初探
- VS 自动添加注释
- VS头部自动注释
- ArcGIS Desktop Add-in插件开发系列二
- Python 插件(add-in) 基础知识
- 自己动手编写一个VS插件(二)——理解OnConnection函数
- 自己动手编写一个VS插件(四)——创建工具栏之二
- 自己动手编写一个VS插件(二)——理解OnConnection函数
- 自己动手编写一个VS插件(四)——创建工具栏之二
- 自己动手编写一个VS插件(一)
- 自己动手编写一个VS插件(五)
- 自己动手编写一个VS插件(六)
- 自己动手编写一个VS插件(七)
- android系统自带样式
- EBS消息显示代码
- SSH学习问题之:Package front extends undefined package struts-default
- 最小生成树(Prim)
- Ubuntu14.04下Eclipse崩溃“crash: fatal error in soup_session_feature_detach”修复办法
- vs自动注释add-in插件编写(二)--CConnect
- Kruskal【MST】
- USACO section2.2 Runaround Numbers题解&代码
- 杭电acm 1016
- Leetcode:Gray Code
- HotSpot SA #3:FinalizerInfo
- 函数指针之探秘
- 黑马程序员--继承、抽象类、接口
- 实现C语言字符串操作的库函数