IDEA-164610 Quick documentation should escape angle brackets at the value of a String field referred via @value (javadoc tag)

also add quotes to string value, and convert value into a link to corresponding field's javadoc, like javadoc tool does
This commit is contained in:
Dmitry Batrak
2016-11-30 18:01:44 +03:00
parent 59c6fe0401
commit e6a6f609ea
6 changed files with 17 additions and 3 deletions
@@ -0,0 +1 @@
<html><head><base href="placeholder"> <style type="text/css"> #error { background-color: #eeeeee; margin-bottom: 10px; } p { margin: 5px 0; } </style></head><body><small><b><a href="psi_element://A"><code>A</code></a></b></small><PRE>public static&nbsp;void&nbsp;<b>JAVADOC_ME</b>()</PRE> The value of B is <a href="psi_element://A#B">"a&lt;b"</a>.</body></html>
@@ -0,0 +1,6 @@
class A {
public static String B = "a<b";
/** The value of B is {@value #B}. */
public static void JAVADOC_ME() { }
}
@@ -1 +1 @@
<html><head><base href="placeholder"> <style type="text/css"> #error { background-color: #eeeeee; margin-bottom: 10px; } p { margin: 5px 0; } </style></head><body><small><b><a href="psi_element://A"><code>A</code></a></b></small><PRE>public static&nbsp;void&nbsp;<b>JAVADOC_ME</b>()</PRE> The value of A is 23.</body></html>
<html><head><base href="placeholder"> <style type="text/css"> #error { background-color: #eeeeee; margin-bottom: 10px; } p { margin: 5px 0; } </style></head><body><small><b><a href="psi_element://A"><code>A</code></a></b></small><PRE>public static&nbsp;void&nbsp;<b>JAVADOC_ME</b>()</PRE> The value of A is <a href="psi_element://A#A">23</a>.</body></html>
@@ -1 +1 @@
<html><head><base href="placeholder"> <style type="text/css"> #error { background-color: #eeeeee; margin-bottom: 10px; } p { margin: 5px 0; } </style></head><body><small><b><a href="psi_element://A"><code>A</code></a></b></small><PRE>public static&nbsp;void&nbsp;<b>JAVADOC_ME</b>()</PRE> The value of A is 23.</body></html>
<html><head><base href="placeholder"> <style type="text/css"> #error { background-color: #eeeeee; margin-bottom: 10px; } p { margin: 5px 0; } </style></head><body><small><b><a href="psi_element://A"><code>A</code></a></b></small><PRE>public static&nbsp;void&nbsp;<b>JAVADOC_ME</b>()</PRE> The value of A is <a href="psi_element://A#A">23</a>.</body></html>