summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManju Mathew2013-02-04 08:49:03 (EST)
committerDani Megert2013-02-04 08:49:03 (EST)
commitd79155d1054134764d5883aa594c7cd7c1884ef1 (patch)
treead6008102ed770185cf54ac8d60ac984ee0d6c94
parent71a008c52068d9d91b2cf813539fe4255546564f (diff)
downloadeclipse.jdt.ui-d79155d1054134764d5883aa594c7cd7c1884ef1.zip
eclipse.jdt.ui-d79155d1054134764d5883aa594c7cd7c1884ef1.tar.gz
eclipse.jdt.ui-d79155d1054134764d5883aa594c7cd7c1884ef1.tar.bz2
Fixed bug 396809: [hovering] Write JUnits for the package hoveringv20130204-134903
feature
-rw-r--r--org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/JavadocHover_src.zipbin0 -> 4165 bytes
-rw-r--r--org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData.zipbin0 -> 3314 bytes
-rw-r--r--org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData_src.zipbin0 -> 7171 bytes
-rw-r--r--org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java4
-rw-r--r--org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageHover/PackageJavadocTests.java301
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java2
7 files changed, 306 insertions, 2 deletions
diff --git a/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF
index e4f46aa..34a724e 100644
--- a/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF
@@ -29,6 +29,7 @@ Export-Package:
org.eclipse.jdt.ui.tests.jarexport;x-internal:=true,
org.eclipse.jdt.ui.tests.leaks;x-internal:=true,
org.eclipse.jdt.ui.tests.model;x-internal:=true,
+ org.eclipse.jdt.ui.tests.packageHover;x-internal:=true,
org.eclipse.jdt.ui.tests.packageview;x-internal:=true,
org.eclipse.jdt.ui.tests.performance;x-internal:=true,
org.eclipse.jdt.ui.tests.performance.views;x-internal:=true,
diff --git a/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/JavadocHover_src.zip b/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/JavadocHover_src.zip
new file mode 100644
index 0000000..371f7fb
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/JavadocHover_src.zip
Binary files differ
diff --git a/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData.zip b/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData.zip
new file mode 100644
index 0000000..f089c11
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData.zip
Binary files differ
diff --git a/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData_src.zip b/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData_src.zip
new file mode 100644
index 0000000..8fda3ca
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests/testresources/PackageJavadocTests/testData_src.zip
Binary files differ
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java
index 7bec4a0..2166a1a 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.jdt.ui.tests.callhierarchy.CallHierarchyContentProviderTest;
import org.eclipse.jdt.ui.tests.core.CoreTests;
import org.eclipse.jdt.ui.tests.jarexport.JarExportTests;
import org.eclipse.jdt.ui.tests.model.ContentProviderTests;
+import org.eclipse.jdt.ui.tests.packageHover.PackageJavadocTests;
import org.eclipse.jdt.ui.tests.packageview.PackageExplorerTests;
import org.eclipse.jdt.ui.tests.quickfix.QuickFixTest;
import org.eclipse.jdt.ui.tests.search.SearchTest;
@@ -73,6 +74,7 @@ public class AutomatedSuite extends TestSuite {
addTest(BuildpathModifierActionTest.suite());
addTest(JarExportTests.suite());
+ addTest(PackageJavadocTests.suite());
}
}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageHover/PackageJavadocTests.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageHover/PackageJavadocTests.java
new file mode 100644
index 0000000..623b6ec
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageHover/PackageJavadocTests.java
@@ -0,0 +1,301 @@
+/*******************************************************************************
+ * Copyright (c) 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.ui.tests.packageHover;
+
+import java.io.File;
+
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.testplugin.JavaProjectHelper;
+import org.eclipse.jdt.testplugin.JavaTestPlugin;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jface.text.Region;
+
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+
+import org.eclipse.jdt.internal.core.JavaElement;
+
+import org.eclipse.jdt.ui.tests.core.CoreTests;
+import org.eclipse.jdt.ui.tests.core.ProjectTestSetup;
+
+import org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput;
+import org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover;
+
+
+/**
+ * Tests for fetching package Javadoc.
+ *
+ * @since 3.9
+ */
+public class PackageJavadocTests extends CoreTests {
+
+ public PackageJavadocTests(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return setUpTest(new TestSuite(PackageJavadocTests.class));
+ }
+
+ private IJavaProject fJProject1;
+
+
+ public void testGetDocFromPackageHtml_src() throws Exception {
+
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/javadochoverhtml/JavaDocHoverTest.java"));
+ assertNotNull("JavaDocHoverTest.java", cu);
+
+ IPackageFragment pack= (IPackageFragment)cu.getParent();
+ IJavaElement[] elements= new JavaElement[1];
+ elements[0]= pack;
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(elements, cu, new Region(21, 16), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+
+ //checking for some part of the expected Javadoc which could be retrieved.
+ Assert.assertTrue(actualHtmlContent.contains("Test package documentation in package.html"));
+ }
+
+
+ public void testGetDocFromPackageInfoJava_src() throws Exception {
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/javadochover/Activator.java"));
+ assertNotNull("Activator.java", cu);
+
+ IPackageFragment pack= (IPackageFragment)cu.getParent();
+ IJavaElement[] elements= new JavaElement[1];
+ elements[0]= pack;
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(elements, cu, new Region(21, 12), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+
+ Assert.assertTrue(actualHtmlContent.contains("This is the test content"));
+ }
+
+ public void testGetDocFromPackageHtml_archive() throws Exception {
+
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/javadochoverhtml/JavaDocHoverTest.java"));
+ assertNotNull("JavaDocHoverTest.java", cu);
+
+ IPackageFragment pack= (IPackageFragment)cu.getParent();
+ IJavaElement[] elements= new JavaElement[1];
+ elements[0]= pack;
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(elements, cu, new Region(67, 10), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+
+ Assert.assertTrue(actualHtmlContent.contains("Test package documentation in package.html"));
+ }
+
+ public void testGetDocFromPackageInfoJava_archive() throws Exception {
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/javadochoverhtml/JavaDocHoverTest.java"));
+ assertNotNull("JavaDocHoverTest.java", cu);
+
+ File clsJarPath= JavaTestPlugin.getDefault().getFileInPlugin(new Path("/testresources/PackageJavadocTests/testData.zip"));
+ File srcJarPath= JavaTestPlugin.getDefault().getFileInPlugin(new Path("/testresources/PackageJavadocTests/testData_src.zip"));
+
+
+ JavaProjectHelper.addLibraryWithImport(fJProject1, new Path(clsJarPath.getAbsolutePath()), new Path(srcJarPath.getAbsolutePath()), null);
+ fJProject1.open(null);
+ IPackageFragmentRoot jarRoot= this.fJProject1.getPackageFragmentRoot(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("/TestSetupProject/testData.zip")));
+ IPackageFragment packageFragment= jarRoot.getPackageFragment("org.eclipse.jdt.ui.tests");
+ assertNotNull(packageFragment);
+ IPath sourceAttachmentPath= jarRoot.getSourceAttachmentPath();
+ Assert.assertNotNull(sourceAttachmentPath);
+
+ int offset= cu.getSource().indexOf("org.eclipse.jdt.ui.tests");
+ int length= "org.eclipse.jdt.ui.tests".length();
+ IJavaElement[] codeSelect= cu.codeSelect(offset, length);
+ Assert.assertNotNull(codeSelect);
+ Assert.assertTrue("No package found !", codeSelect.length > 0);
+ packageFragment= (IPackageFragment)codeSelect[0];
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(new IJavaElement[] { packageFragment }, cu, new Region(offset, length), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+
+ Assert.assertTrue(actualHtmlContent.contains("This is the package documentation for org.eclipse.jdt.ui.tests"));
+
+ }
+
+
+ public void testGetDocFromSourceAttachmentRootPath() throws Exception {
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/javadochoverhtml/JavaDocHoverTest.java"));
+ assertNotNull("JavaDocHoverTest.java", cu);
+
+ File clsJarPath= JavaTestPlugin.getDefault().getFileInPlugin(new Path("/testresources/PackageJavadocTests/testData.zip"));
+ File srcJarPath= JavaTestPlugin.getDefault().getFileInPlugin(new Path("/testresources/PackageJavadocTests/testData_src.zip"));
+
+
+ JavaProjectHelper.addLibraryWithImport(fJProject1, new Path(clsJarPath.getAbsolutePath()), new Path(srcJarPath.getAbsolutePath()), new Path("src"));
+ fJProject1.open(null);
+ IPackageFragmentRoot jarRoot= this.fJProject1.getPackageFragmentRoot(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("/TestSetupProject/testData.zip")));
+ Assert.assertTrue(jarRoot != null && jarRoot.exists());
+ IPackageFragment packageFragment= jarRoot.getPackageFragment("org.eclipse.jdt.ui.tests.html");
+ Assert.assertTrue(packageFragment != null && packageFragment.exists());
+ IPath sourceAttachmentPath= jarRoot.getSourceAttachmentPath();
+ Assert.assertNotNull(sourceAttachmentPath);
+
+ int offset= cu.getSource().indexOf("org.eclipse.jdt.ui.tests.html");
+ int length= "org.eclipse.jdt.ui.tests.html".length();
+ IJavaElement[] codeSelect= cu.codeSelect(offset, length);
+ Assert.assertNotNull(codeSelect);
+ Assert.assertTrue("No package found !", codeSelect.length > 0);
+ packageFragment= (IPackageFragment)codeSelect[0];
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(new IJavaElement[] { packageFragment }, cu, new Region(offset, length), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+
+
+ Assert.assertTrue(actualHtmlContent.contains("This is the package documentation for org.eclipse.jdt.ui.tests.html."));
+
+ }
+
+
+ public void testGetPackageAttacheddoc() throws Exception {
+ // http://download.oracle.com/javase/6/docs/api/
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/javadochoverhtml/JavaDocHoverTest.java"));
+ assertNotNull("JavaDocHoverTest.java", cu);
+
+
+ IClasspathAttribute attribute=
+ JavaCore.newClasspathAttribute(
+ IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME,
+ "url:http://download.oracle.com/javase/6/docs/api/");
+ IClasspathEntry[] rawClasspath= fJProject1.getRawClasspath();
+ IClasspathEntry newEntry= JavaCore.newLibraryEntry(new Path(JavaTestPlugin.getDefault().getFileInPlugin(new Path("/testresources/rtstubs15.jar")).getAbsolutePath()), null, null, null,
+ new IClasspathAttribute[] { attribute }, false);
+ rawClasspath[0]= newEntry;
+ IClasspathEntry[] newPathEntry= new IClasspathEntry[] { rawClasspath[0], rawClasspath[1] };
+ this.fJProject1.setRawClasspath(newPathEntry, null);
+ this.fJProject1.getResolvedClasspath(false);
+
+ int offset= cu.getSource().indexOf("java.math");
+ int length= "java.math".length();
+ IJavaElement[] codeSelect= cu.codeSelect(offset, length);
+ Assert.assertNotNull(codeSelect);
+ Assert.assertTrue("No package found !", codeSelect.length > 0);
+
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(codeSelect, cu, new Region(offset, length), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+ Assert.assertNotNull(actualHtmlContent);
+
+ Assert.assertTrue(actualHtmlContent.contains("Provides classes for performing arbitrary-precision integer arithmetic"));
+
+ }
+
+ /**
+ * Package Javadoc hover throws NullPointerException if package-info.java contains references.
+ * This test case is to test the fix.
+ *
+ * @throws Exception when the test case fails
+ */
+ public void testPackageInfoWithReferenceLinks() throws Exception {
+
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/checkPackageInfo/TestNPEHover.java"));
+ assertNotNull("TestNPEHover.java", cu);
+
+ IPackageFragment pack= (IPackageFragment)cu.getParent();
+ IJavaElement[] elements= new JavaElement[1];
+ elements[0]= pack;
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(elements, cu, new Region(21, 12), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+
+ Assert.assertTrue(actualHtmlContent.contains("The pack is a test package. This doc contains references"));
+ }
+
+ public void testPackageWithNoJavadoc() throws Exception {
+ File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/PackageJavadocTests/JavadocHover_src.zip"));
+ assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
+ JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", junitSrcArchive, JavaProjectHelper.JUNIT_SRC_ENCODING);
+ ICompilationUnit cu= (ICompilationUnit)fJProject1.findElement(new Path("junit/javadochoverhtml/JavaDocHoverTest.java"));
+ assertNotNull("JavaDocHoverTest.java", cu);
+
+ File clsJarPath= JavaTestPlugin.getDefault().getFileInPlugin(new Path("/testresources/PackageJavadocTests/testData.zip"));
+ File srcJarPath= JavaTestPlugin.getDefault().getFileInPlugin(new Path("/testresources/PackageJavadocTests/testData_src.zip"));
+
+
+ JavaProjectHelper.addLibraryWithImport(fJProject1, new Path(clsJarPath.getAbsolutePath()), new Path(srcJarPath.getAbsolutePath()), new Path("src"));
+ fJProject1.open(null);
+ IPackageFragmentRoot jarRoot= this.fJProject1.getPackageFragmentRoot(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("/TestSetupProject/testData.zip")));
+ Assert.assertTrue(jarRoot != null && jarRoot.exists());
+ IPackageFragment packageFragment= jarRoot.getPackageFragment("org.eclipse.jdt.ui.tests.noJavadoc");
+ Assert.assertTrue(packageFragment != null && packageFragment.exists());
+ IPath sourceAttachmentPath= jarRoot.getSourceAttachmentPath();
+ Assert.assertNotNull(sourceAttachmentPath);
+
+ int offset= cu.getSource().indexOf("org.eclipse.jdt.ui.tests.noJavadoc");
+ int length= "org.eclipse.jdt.ui.tests.noJavadoc".length();
+ IJavaElement[] codeSelect= cu.codeSelect(offset, length);
+ Assert.assertNotNull(codeSelect);
+ Assert.assertTrue("No package found !", codeSelect.length > 0);
+ packageFragment= (IPackageFragment)codeSelect[0];
+ JavadocBrowserInformationControlInput hoverInfo= JavadocHover.getHoverInfo(new IJavaElement[] { packageFragment }, cu, new Region(offset, length), null);
+ String actualHtmlContent= hoverInfo.getHtml();
+
+ Assert.assertTrue(actualHtmlContent.contains("Note: This element has no attached Javadoc and the Javadoc could not be found in the attached source."));
+ }
+
+ public static Test setUpTest(Test test) {
+ return new ProjectTestSetup(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ fJProject1= ProjectTestSetup.getProject();
+
+ }
+
+
+ @Override
+ protected void tearDown() throws Exception {
+ JavaProjectHelper.clear(fJProject1, ProjectTestSetup.getDefaultClasspath());
+ }
+
+}
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java
index 6a680f7..283b4d2 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java
@@ -653,7 +653,7 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
* @return the HTML hover info for the given element(s) or <code>null</code> if no information is available
* @since 3.4
*/
- private static JavadocBrowserInformationControlInput getHoverInfo(IJavaElement[] elements, ITypeRoot editorInputElement, IRegion hoverRegion, JavadocBrowserInformationControlInput previousInput) {
+ public static JavadocBrowserInformationControlInput getHoverInfo(IJavaElement[] elements, ITypeRoot editorInputElement, IRegion hoverRegion, JavadocBrowserInformationControlInput previousInput) {
StringBuffer buffer= new StringBuffer();
boolean hasContents= false;
String base= null;