Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326042 - [otmodel] JavaModelException when hovering over a callout to field
Summary: [otmodel] JavaModelException when hovering over a callout to field
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.8 M5   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-23 08:50 EDT by Stephan Herrmann CLA
Modified: 2011-01-29 13:13 EST (History)
0 users

See Also:


Attachments
test & fix (1.97 KB, patch)
2011-01-24 18:22 EST, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-09-23 08:50:23 EDT
Hover over this callout to field:
  org.eclipse.objectteams.otdt.core.hierarchy.OTTypeHierarchies.OTTypeHierarchyImpl.getFocusType() -> IType focusType

and you'll see this exception:

Java Model Exception: Java Model Status [getFocusType() [in OTTypeHierarchyImpl [in OTTypeHierarchies [in [Working copy] OTTypeHierarchies.java [in org.eclipse.objectteams.otdt.core.hierarchy [in src [in org.eclipse.objectteams.otdt]]]]]] does not exist]
	at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:556)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:590)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:273)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:256)
	at org.eclipse.jdt.internal.core.SourceMethod.getExceptionTypes(SourceMethod.java:92)
	at org.eclipse.objectteams.otdt.internal.core.MethodMapping.getExceptionTypes(MethodMapping.java:488)
	at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.initExceptionNames(JavadocContentAccess2.java:854)
	at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.toHTML(JavadocContentAccess2.java:702)
	at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.javadoc2HTML(JavadocContentAccess2.java:628)
	at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.getHTMLContentFromSource(JavadocContentAccess2.java:574)
	at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.getHTMLContent(JavadocContentAccess2.java:466)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:609)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:555)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:547)
	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:141)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:82)
	at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)
Comment 1 Stephan Herrmann CLA 2010-09-23 17:38:12 EDT
Fix might be very simple considering the fact that a callout to field 
cannot declare any exceptions nor propagate declared exceptions from its base.
Comment 2 Stephan Herrmann CLA 2011-01-24 18:22:36 EST
Created attachment 187483 [details]
test & fix

Simple test and equally simple fix.
Comment 3 Stephan Herrmann CLA 2011-01-24 18:25:15 EST
Released in r1243, r1244 for 0.8M5.
Comment 4 Stephan Herrmann CLA 2011-01-29 13:13:06 EST
Verified for 0.8M5 using build 201101290806.