mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-201377 JavaDoc popup follow link issue
This commit is contained in:
@@ -1213,7 +1213,8 @@ public class JavaDocInfoGenerator {
|
||||
if (aClass != null) {
|
||||
String qName = aClass.getQualifiedName();
|
||||
if (qName != null) {
|
||||
return StringUtil.repeat("../", StringUtil.countChars(qName, '.') + 1);
|
||||
String path = StringUtil.repeat("../", StringUtil.countChars(qName, '.'));
|
||||
return path.isEmpty() ? "" : path.substring(0, path.length() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<html><head><base href="placeholder"></head><body><div class='definition'><pre>foo.bar<br>class <b>Baz</b>
|
||||
extends <a href="psi_element://java.lang.Object"><code>Object</code></a></pre></div><div class='content'>
|
||||
<a href="../../someFile.html">link</a>
|
||||
</div><table class='sections'><p></table>
|
||||
@@ -0,0 +1,6 @@
|
||||
package foo.bar;
|
||||
|
||||
/**
|
||||
* <a href="{@docRoot}/someFile.html">link</a>
|
||||
*/
|
||||
class Baz {}
|
||||
+4
@@ -239,6 +239,10 @@ public class JavaDocInfoGeneratorTest extends CodeInsightTestCase {
|
||||
doTestAtCaret();
|
||||
}
|
||||
|
||||
public void testDocRoot() throws Exception {
|
||||
doTestClass();
|
||||
}
|
||||
|
||||
private void doTestClass() throws Exception {
|
||||
PsiClass psiClass = getTestClass();
|
||||
verifyJavaDoc(psiClass);
|
||||
|
||||
Reference in New Issue
Block a user