VVDocumenter - Xcod代码注释工具

        刚接触IOS开发时,发现XCODE非常的强大的,后续的代码实践中发现XOCDE的代码文档注释非常的差,

每次都要用手敲,蛋疼至极;

随着不断学习发现XCODE有代码片段内嵌一说(如:for 、block、coreData),并且可以自定义自己的代码片段,忽然联想到自己可以生成一个代码注解片段,随便百度下真有这么干的;

下面是我简单写的代码注释片段,直接复制拖入到CODE Snippet Library中,使用的时候直接拖入到你的方法上!OVER!

[java]  view plain copy
  1. #pragma mark -<#description#>  
  2. /** 
  3.  <#description#> 
  4.  @param <#parameter#> 
  5.  @returns <#retval#> 
  6.  @by liaoyp 
  7.  */  


 随着不断的学习发现,其实这个工具非常的机械的,就是简单的代码注释模板,每次添加都需要进行修改;

相比以前的原始社会,至少也是进入了石器时代;


下面介绍一个开源的XCODE的代码注释工具,只要在写文档的代码上面连打三个斜杠,就能自动提取参数等生成规范的Javadoc格式文档;

VVDocumenter-Xcode

Xcode plug-in which helps you write Javadoc style documents easier.


使用非常的简单,直接Download下载下来,然后运行,重启XCODE , 插件会生成在/Library/Application Support/Developer/Shared/Xcode/Plug-ins 目录下,运行完毕如果没有找到该插件说明安装失败!


Note: 该项目编译的目标环境是OS10.8  、XCODE4.6 ,对于系统处于10.7.5估计代码运行编译正常,但重启没有看到所谓的智能提示 ;


解决办法:把目标编译改成10.7,编译会报错,作者采用的是最新OC语法,对应的改回OC2.0语法就OK !


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
C代码注释删除工具,用Lex生成。可删除C源程序中的/* xxxx */的块或单行注释,及C++风格的单行注释,对于常量字符串中出现的注释不清除。文件包含Lex代码及编译的Linux下的可执行文件。编译及使用见Readme。 C注释的类型如下 // /* // * "C-style block comment be removed // * C-style block comment be removed" // * C-style block comment be removed // */ // // /* C-style single line comment be removed */ // // // c++ comment be removed // // ///* c++ comment be removed */ // c++ comment be removed // // // c++ comment enclosed with double-quote untouched // "////*\"c++ comment enclosed with double-quote untouched\" ##*/\n" // // // c-style single line comment enclosed with double-quote untouched // "/*c-style multiple line comment enclosed with double-quote untouched*/\n" // // // c-style multiple line comment enclosed with double-quote untouched // "/** c-style multiple line comment enclosed with double-quote untouched \n\ // \n next line\ // */\n" 示例文件: int main() { /* * "C-style block comment be removed * C-style block comment be removed" * C-style block comment be removed */ /* C-style single line comment be removed */ int foo; /* C-style single line comment be removed */ /* C-style single line comment be removed */ int bar; int foobar; /* "C-style block comment be removed C-style block comment be removed C-style block comment be removed */ // c++ comment be removed ///* c++ comment be removed */ // c++ comment be removed // "////" ???? // "/*test file */" ????? /* ssss /* dddd */ printf("////*\"c++ comment enclosed with double-quote untouched\" ##*/\n"); // c++ comment enclosed with double-quote untouched printf("/*c-style multiple line comment enclosed with double-quote untouched*/\n"); // c-style single line comment enclosed with double-quote untouched // printf("/** test cmnt \n //\n ss //*/"); printf("/** c-style multiple line comment enclosed with double-quote untouched \n\ \n next line\ */\n"); // c-style multiple line comment enclosed with double-quote untouched } 注释删除后成为: int main() { int foo; int bar; int foobar; printf("////*\"c++ comment enclosed with double-quote untouched\" ##*/\n"); printf("/*c-style multiple line comment enclosed with double-quote untouched*/\n"); printf("/** c-style multiple line comment enclosed with double-quote untouched \n\ \n next line\ */\n"); }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值