本文介绍了如何在没有自动DocBlock格式的NetBeans中执行多行注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时在我的代码中我喜欢注释一段代码临时使用/引用等,例如:

Sometimes in my code I like to comment out a block of code for temporary use/reference etc eg:

/*

blah

*/

一个小麻烦,如果我然后想去插入一行内的块,当我单击enter,它会自动把一个*在下一行,就像我做一个DocBlock。这发生在每个输入键:

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>
*

*/

自动格式化应该只在开始注释使用格式/ **(两颗星)时发生。多行注释在DocBlocks之前很久,所以我不知道为什么它强制这些老学校标准直接/ * * /注释有奇怪的多余的DocBlock *的!

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!

所以有办法:


  • a)理想情况下,标签是/ **

  • b)或者如果它不能区分/ *和/ **,是否有一种方法完全禁用自动评论格式? >
  • 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?

干杯

推荐答案

这是一个Netbeans Bug在他们的Bugzilla,他们现在解决了这个问题。他们这样做非常迅速我应该在12小时内添加他们的努力。从我可以做出来,它看起来像包含在Netbeans 7.4版本。 Gotta爱开源! :)

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! :)

这里的工作详情:

这篇关于如何在没有自动DocBlock格式的NetBeans中执行多行注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-12 17:03