Community
Participate
Working Groups
Some minor miscellaneous code changes for the package hovering feature.
Created attachment 225215 [details] The polished code is attached as patch
I've already fixed the toOSString() with the fix for bug 397464, so I only applied the change in ProposalInfo: Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=046ee0128866e0a27a85f295b682656c3af84b92 Some other thing to polish: if no Javadoc is available (e.g. for 'sun.awt.im') we log an error. This is not good.
I also get exceptions when hovering over a field in the compare editor (e.g. when comparing org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo with some older version and hover over 'fOrginalFolders': !ENTRY org.eclipse.jdt.ui 4 10001 2013-01-07 14:33:46.863 !MESSAGE Internal Error !STACK 1 Java Model Exception: Java Model Status [<project root> [in ] is not on its project's build path] at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:508) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:521) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:258) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:244) at org.eclipse.jdt.internal.core.PackageFragmentRoot.getKind(PackageFragmentRoot.java:481) at org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations.getExplanationForMissingJavadoc(JavaDocLocations.java:647) at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:651) at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:567) at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:559) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:163) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:129) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:85) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166) !SUBENTRY 1 org.eclipse.jdt.core 4 1006 2013-01-07 14:33:46.863 !MESSAGE <project root> [in ] is not on its project's build path
(In reply to comment #3) > I also get exceptions when hovering over a field in the compare editor (e.g. > when comparing org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo with > some older version and hover over 'fOrginalFolders': > Test Case: 1. paste this: public class Bug { /** * This works as it has Javadoc. */ void foo() { } } 2. make a change and save 3. compare with previous version 4. on the right side hover over 'Bug' ==> exception and hover talking about the exception
Created attachment 225325 [details] Fix This patch contains the fix for 1. if no Javadoc is available (e.g. for 'sun.awt.im') we log an error. 2. exceptions when hovering over a field in the compare editor.
(In reply to comment #5) > Created attachment 225325 [details] [diff] > Fix > > This patch contains the fix for > 1. if no Javadoc is available (e.g. for 'sun.awt.im') we log an error. Not really. I still get: !ENTRY org.eclipse.jdt.core 4 1008 2013-01-08 13:35:07.565 !MESSAGE Cannot retrieve the attached javadoc for sun.awt.im [in C:\JavaSDKs\jdk7-fcs-bin-b147\jre\lib\rt.jar] > 2. exceptions when hovering over a field in the compare editor. This seems to be gone. Did not look at the code.
Created attachment 225936 [details] Proposed Fix. Since bug 398272 is resolved, the problem with throwing an exception when the Javadoc content is not available is resolved. The fix for Javadoc hover showing an exception in compare editor is done.
Thanks for the patch Manju. Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=9528419f8d69d6adccd9dc68a70e733ca59b54e3
.
*** Bug 399291 has been marked as a duplicate of this bug. ***