IDEA-96385 Uncomplete definition of variable in "Quick Documentation" Window

This commit is contained in:
Denis.Zhdanov
2013-02-02 15:05:03 +04:00
parent 8e3e979306
commit cd70acac56
4 changed files with 18 additions and 2 deletions
@@ -0,0 +1 @@
<html><head> <style type="text/css"> #error { background-color: #eeeeee; margin-bottom: 10px; } p { margin: 5px 0; } </style></head><body><small><b><a href="psi_element://Test"><code>Test</code></a></b></small><PRE>public int <b>field = anotherField</b></PRE></body></html>
@@ -0,0 +1,4 @@
class Test {
public int field = anotherField;
public static int anotherField = 1;
}
@@ -58,6 +58,10 @@ public class JavaDocInfoGeneratorTest extends CodeInsightTestCase {
public void testInitializerWithNew() throws Exception {
doTestField();
}
public void testInitializerWithReference() throws Exception {
doTestField();
}
private void doTestField() throws Exception {
PsiClass psiClass = getTestClass();
@@ -80,6 +84,7 @@ public class JavaDocInfoGeneratorTest extends CodeInsightTestCase {
final File htmlPath = new File(JavaTestUtil.getJavaTestDataPath() + "/codeInsight/javadocIG/" + getTestName(true) + ".html");
String htmlText = FileUtil.loadFile(htmlPath);
String docInfo = new JavaDocInfoGenerator(getProject(), field).generateDocInfo(null);
assertNotNull(docInfo);
assertEquals(StringUtil.convertLineSeparators(htmlText.trim()), StringUtil.convertLineSeparators(docInfo.trim()));
}
@@ -90,6 +95,7 @@ public class JavaDocInfoGeneratorTest extends CodeInsightTestCase {
final String info =
new JavaDocInfoGenerator(getProject(), JavaPsiFacade.getInstance(getProject()).findPackage(getTestName(true))).generateDocInfo(null);
String htmlText = FileUtil.loadFile(new File(packageInfo + File.separator + "packageInfo.html"));
assertNotNull(info);
assertEquals(StringUtil.convertLineSeparators(htmlText.trim()), StringUtil.convertLineSeparators(info.trim()));
}