mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-145931 Garbage text when viewing JDK Javadoc
This commit is contained in:
+164
@@ -0,0 +1,164 @@
|
||||
<!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_60) on Tue Oct 06 14:49:06 AST 2015 -->
|
||||
<title>SimpleInterface</title>
|
||||
<meta name="date" content="2015-10-06">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="SimpleInterface";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../com/jetbrains/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-files/index-1.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Class</li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/jetbrains/SimpleInterface.html" target="_top">Frames</a></li>
|
||||
<li><a href="SimpleInterface.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.jetbrains</div>
|
||||
<h2 title="Interface SimpleInterface" class="title">Interface SimpleInterface</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <span class="typeNameLabel">SimpleInterface</span></pre>
|
||||
<div class="block">Doc here</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../com/jetbrains/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-files/index-1.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Class</li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/jetbrains/SimpleInterface.html" target="_top">Frames</a></li>
|
||||
<li><a href="SimpleInterface.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.jetbrains;
|
||||
|
||||
/**
|
||||
* Doc here
|
||||
*/
|
||||
public interface SimpleInterface {
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<HTML><style type="text/css"> ul.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
ul.inheritance li {
|
||||
display:inline;
|
||||
list-style:none;
|
||||
}
|
||||
ul.inheritance li ul.inheritance {
|
||||
margin-left:15px;
|
||||
padding-left:15px;
|
||||
padding-top:1px;
|
||||
}
|
||||
</style><!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.jetbrains</div>
|
||||
<h2 title="Interface SimpleInterface" class="title">Interface SimpleInterface</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<DL><br>
|
||||
<pre>public interface <span class="typeNameLabel">SimpleInterface</span></pre>
|
||||
<div class="block">Doc here</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
</HTML>
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,6 +58,10 @@ public class ExternalJavadocPresentationTest extends LightCodeInsightTestCase {
|
||||
public void testPackageSummary() throws Exception {
|
||||
doTest("java/lang/package-summary.html", "packageSummary/util/page.html", "packageSummary/util/expected.html");
|
||||
}
|
||||
|
||||
public void testNoMethodsOrFieldsInClass() throws Exception {
|
||||
doTest("SimpleInterface.html", "noMethodsOrFieldsInClass/SimpleInterface.html", "noMethodsOrFieldsInClass/expected.html");
|
||||
}
|
||||
|
||||
private void doTest(@NonNls String url, @NonNls String pageText, @NonNls String expected) throws Exception {
|
||||
doTest(url, pageText, expected, true);
|
||||
|
||||
+5
-4
@@ -63,6 +63,7 @@ public abstract class AbstractExternalFilter {
|
||||
Pattern.compile("<meta[^>]+\\s*charset=\"?([\\w\\-]*)\\s*\">", Pattern.CASE_INSENSITIVE);
|
||||
private static final String FIELD_SUMMARY = "<!-- =========== FIELD SUMMARY =========== -->";
|
||||
private static final String CLASS_SUMMARY = "<div class=\"summary\">";
|
||||
@NonNls private static final String GREATEST_END_SECTION = "<!-- ========= END OF CLASS DATA ========= -->";
|
||||
|
||||
protected static abstract class RefConvertor {
|
||||
@NotNull
|
||||
@@ -182,7 +183,6 @@ public abstract class AbstractExternalFilter {
|
||||
@NonNls Pattern startSection = settings.startPattern;
|
||||
@NonNls Pattern endSection = settings.endPattern;
|
||||
boolean useDt = settings.useDt;
|
||||
@NonNls String greatestEndSection = "<!-- ========= END OF CLASS DATA ========= -->";
|
||||
|
||||
data.append(HTML);
|
||||
URL baseUrl = VfsUtilCore.convertToURL(url);
|
||||
@@ -254,7 +254,7 @@ public abstract class AbstractExternalFilter {
|
||||
data.append(H2);
|
||||
skip = true;
|
||||
}
|
||||
else if (endSection.matcher(read).find() || StringUtil.indexOfIgnoreCase(read, greatestEndSection, 0) != -1) {
|
||||
else if (endSection.matcher(read).find() || StringUtil.indexOfIgnoreCase(read, GREATEST_END_SECTION, 0) != -1) {
|
||||
data.append(HTML_CLOSE);
|
||||
return;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ public abstract class AbstractExternalFilter {
|
||||
|
||||
while (((read = buf.readLine()) != null) &&
|
||||
!endSection.matcher(read).find() &&
|
||||
StringUtil.indexOfIgnoreCase(read, greatestEndSection, 0) == -1) {
|
||||
StringUtil.indexOfIgnoreCase(read, GREATEST_END_SECTION, 0) == -1) {
|
||||
if (!StringUtil.toUpperCase(read).contains(HR)
|
||||
&& !StringUtil.containsIgnoreCase(read, "<ul class=\"blockList\">")
|
||||
&& !StringUtil.containsIgnoreCase(read, "<li class=\"blockList\">")) {
|
||||
@@ -315,7 +315,8 @@ public abstract class AbstractExternalFilter {
|
||||
|
||||
private static boolean reachTheEnd(StringBuilder data, String read, StringBuilder classDetails) {
|
||||
if (StringUtil.indexOfIgnoreCase(read, FIELD_SUMMARY, 0) != -1 ||
|
||||
StringUtil.indexOfIgnoreCase(read, CLASS_SUMMARY, 0) != -1) {
|
||||
StringUtil.indexOfIgnoreCase(read, CLASS_SUMMARY, 0) != -1 ||
|
||||
StringUtil.indexOfIgnoreCase(read, GREATEST_END_SECTION, 0) != -1) {
|
||||
data.append(classDetails);
|
||||
data.append(HTML_CLOSE);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user