2011-04-05 42 views

回答

2

右键Java代码浏览到

代码折叠 - >全部折叠的Javadoc

这将折叠所有评论....

enter image description here

+0

别没有看到选项? – 2011-04-05 05:52:58

0

我想清楚为什么:

能够折叠的Java代码中的注释,你需要两个星号,这样的:

/**

,而不是仅仅

/*

+0

Aaah,那是因为/ **是Javadoc Comment,其中as/*仅用于多行“非javadoc”注释。 – edwardsmatt 2011-04-07 23:15:41

1

还要检查:

工具 - >选项 - >编辑器

有在那里有一堆复选框来配置默认折叠。

3

还可以包括像

// <editor-fold defaultstate="collapsed" desc="stuff to be collapsed"> 
/* start of comment 
... 
*/ 
// </editor-fold> 
0

我具备的功能有很长的线,我通常做这个

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

我希望这将是有用的:))