[英]How to fold (all types of) comments in netbeans?
Netbeans似乎與我的Java代碼中的折疊注釋不一致。 有時我可以棄用評論,有時我不能。 有幫助嗎? 謝謝。
你也可以包括類似的東西
// <editor-fold defaultstate="collapsed" desc="stuff to be collapsed">
/* start of comment
...
*/
// </editor-fold>
我有很長的線路功能,我通常這樣做
// <editor-fold defaultstate="collapsed" desc="Description (Example Execute)">
/**
*
* Execute the query
*
* Accepts an SQL string as input and returns a result object upon
* successful execution of a "read" type query. Returns boolean TRUE
* upon successful execution of a "write" type query. Returns boolean
* FALSE upon failure, and if the $db_debug variable is set to TRUE
* will raise an error.
*
* @param string $sql
* @param array $binds = FALSE An array of binding data
* @param bool $return_object = NULL
* @return mixed
*/
public function query($sql, $binds = FALSE, $return_object = NULL){
/* exmample code here */
}
// </editor-fold>
我希望這將是有用的:))
還檢查:
工具 - >選項 - >編輯器
那里有一堆復選框來配置默認折疊。
我想出了原因:
要在java中折疊代碼注釋,您需要兩個星號,如下所示:
/ **
而不是公正的
/ *
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.