有没有办法在IntelliJ IDEA的文档注释中临时呈现HTML标记?我希望能够做到这一点,因为它使阅读一些文档更容易。例如,从JUnit的源考虑下面的代码片段:IntelliJ IDEA - 在Java中呈现HTML标记文档评论
/**
* The Test
annotation tells JUnit that the public void
method
* ...
* ...
*
* A simple test looks like this:
*
* public class Example {
* @Test
* public void method() {
* org.junit.Assert.assertTrue(new ArrayList().isEmpty());
* }
* }
*
*
* The Test
annotation supports two optional parameters.
* The first, expected
, declares that a test method should throw
* ...
* ...
*
* @Test(expected=IndexOutOfBoundsException.class) public void outOfBounds() {
* new ArrayList<Object>().get(1);
* }
*
*
* The second optional parameter, timeout
, causes a test to fail if it takes
* longer than a specified amount of clock time (measured in milliseconds). The following test fails:
*
* @Test(timeout=100) public void infinity() {
* while(true);
* }
*
* Warning: while timeout
is useful to catch and terminate
* infinite loops, it should not be considered deterministic. The
* ...
* ...
*
* @Test(timeout=100) public void sleep100() {
* Thread.sleep(100);
* }
*
*
*
* @since 4.0
*/
所有的标记,就更不用说了HTML编码,使得它一点点难以解析的文档。
我试图寻找一种方法来做到这一点,但没有任何意义。也许我没有使用正确的关键字?