mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-152628 shift-F1 displays two URL
fix tests
This commit is contained in:
@@ -621,7 +621,7 @@ public class JavaDocumentationProvider extends DocumentationProviderEx implement
|
||||
@Nullable
|
||||
public static List<String> getExternalJavaDocUrl(final PsiElement element) {
|
||||
// this method can be slow, as it can perform IO (potentially via network), so it shouldn't be invoked on EDT
|
||||
LOG.assertTrue(!ApplicationManager.getApplication().isDispatchThread());
|
||||
LOG.assertTrue(ApplicationManager.getApplication().isUnitTestMode() || !ApplicationManager.getApplication().isDispatchThread());
|
||||
|
||||
List<String> urls = null;
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.6.0_18) on Mon Jan 11 21:51:28 PST 2016 -->
|
||||
<title>Test</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_71) on Tue Jan 12 00:31:15 PST 2016 -->
|
||||
<title>Test</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -25,13 +25,18 @@ public class ExternalJavadocUrls7Test extends ExternalJavadocUrlsTest {
|
||||
return JAVA_1_7;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getJavadocFolder() {
|
||||
return "java7format";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testVarargs() {
|
||||
doTest("class Test {\n" +
|
||||
" void <caret>foo(Class<?>... cl) { }\n" +
|
||||
"}",
|
||||
|
||||
"foo(java.lang.Class...)", "foo(java.lang.Class<?>...)", "foo-java.lang.Class...-", "foo-java.lang.Class<?>...-"
|
||||
"foo(java.lang.Class...)"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,7 +47,7 @@ public class ExternalJavadocUrls7Test extends ExternalJavadocUrlsTest {
|
||||
"}\n" +
|
||||
"class Comparator<X>{}",
|
||||
|
||||
"sort(T[], Comparator)", "sort(T[], Comparator<? super T>)", "sort-T:A-Comparator-", "sort-T:A-Comparator<? super T>-"
|
||||
"sort(T[], Comparator)"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,12 @@ public class ExternalJavadocUrlsTest extends LightCodeInsightFixtureTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
PsiTestUtil.setJavadocUrls(myModule, "http://doc" );
|
||||
PsiTestUtil.setJavadocUrls(myModule, "file://" + getTestDataPath() + "/java/java-tests/testData/codeInsight/externalJavadoc/" +
|
||||
getJavadocFolder());
|
||||
}
|
||||
|
||||
protected String getJavadocFolder() {
|
||||
return "java8format";
|
||||
}
|
||||
|
||||
public void testVarargs() {
|
||||
@@ -38,7 +43,7 @@ public class ExternalJavadocUrlsTest extends LightCodeInsightFixtureTestCase {
|
||||
" void <caret>foo(Class<?>... cl) { }\n" +
|
||||
"}",
|
||||
|
||||
"foo-java.lang.Class...-", "foo-java.lang.Class<?>...-", "foo(java.lang.Class...)", "foo(java.lang.Class<?>...)");
|
||||
"foo-java.lang.Class...-");
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +53,7 @@ public class ExternalJavadocUrlsTest extends LightCodeInsightFixtureTestCase {
|
||||
"}\n" +
|
||||
"class Comparator<X>{}",
|
||||
|
||||
"sort-T:A-Comparator-", "sort-T:A-Comparator<? super T>-", "sort(T[], Comparator)", "sort(T[], Comparator<? super T>)");
|
||||
"sort-T:A-Comparator-");
|
||||
}
|
||||
|
||||
protected void doTest(String text, String... expected) {
|
||||
|
||||
Reference in New Issue
Block a user