How to do multi-line comments in NetBeans without auto DocBlock formatting?(如何在没有自动 DocBlock 格式的情况下在 NetBeans 中进行多行注释?)
问题描述
有时在我的代码中我喜欢注释掉一段代码以供临时使用/引用等,例如:
/*废话*/
但是如果我想在那个块中插入一行,当我点击回车时,它会自动在下一行放一个 * ,就像我在做一个 DocBlock 一样,这是一个小烦恼.这发生在每个回车键上:
/*等等<在此处按下输入>**/
现在我认为这种自动格式化"应该只在开场评论使用格式/**(两颗星)时发生.多行注释在 DocBlocks 之前已经存在很长时间了,所以我不确定为什么它会强制这些老派"标准直截了当/* */注释具有花哨的不需要的额外 DocBlock * !
那么有没有办法:
- a) 理想情况下 - 只有在开始标记是/** 时才进行格式化
- b) 或者如果它不能区分/* 和/**,有没有办法完全禁用自动注释格式?
干杯
我最终在他们的 Bugzilla 中将此作为 Netbeans 错误输入,他们现在已经修复了该问题.他们很快就做到了,我应该在 12 小时内为他们点赞.据我所知,它似乎将包含在 Netbeans 7.4 版本中.一定要喜欢开源!:)
此处的工作详细信息:
https://netbeans.org/bugzilla/show_bug.cgi?id=230814>
Sometimes in my code I like to comment out a block of code for temporary use/reference etc eg:
/*
blah
*/
But it's a minor annoyance that if I then want to go and insert a line inside that block, when I click enter, it will automatically put a * on the next line as though I were doing a DocBlock. This happens on every enter key:
/*
blah<enter pressed here>
*
*/
Now I would have thought this 'auto-formatting' should only take place if the opening comment is using the format /** (two stars). Multi line comments were around a long time before DocBlocks, so I'm not sure why it forces these "old school" standard straight forward /* */ comments to have fancy unwanted extra DocBlock *'s!
So is there a way to:
- a) Ideally - only have that formatting take place if the opening tag is /**
- b) Or if it can't differentiate between /* and /**, is there a way to disable the auto-comment-formatting entirely?
Cheers
I ended up entering this as a Netbeans bug in their Bugzilla and they have now fixed the issue. They did this VERY Quickly I should add - within 12 hours - kudos to them. From what I can make out it looks like it will be included in Netbeans 7.4 release. Gotta love Open Source! :)
Job details here:
https://netbeans.org/bugzilla/show_bug.cgi?id=230814
这篇关于如何在没有自动 DocBlock 格式的情况下在 NetBeans 中进行多行注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在没有自动 DocBlock 格式的情况下在 NetBeans 中进行多行注释?
- PHP - if 语句中的倒序 2021-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01