mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-96385 Uncomplete definition of variable in "Quick Documentation" Window
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user