Project: JDT
Bug 211447 [hovering] AbstractInformationControlManager computes size constraints based on wrong font
Reported: 2007-11-29 08:58:23 | Status: resolved fixed

HEAD AbstractInformationControlManager computes size constraints based on the subject control's font. This makes e.g. the size of Javadoc hovers dependent on the editor font size, although the Javadoc hover use the dialog font. On the other hand, using the dialog font for the size calculation would be wrong for the source hover (which uses the editor font). To make it correct for all cases, I guess we need an IInformationControlExtension5: A Font getFont() method would just solve this problem, but a Point convertSizeConstraint(int widthInChars, int heightInChars) method would be more flexible and also allow to allocate enough space for more complex information controls with bigger trims (e.g. for additional buttons, ...).

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaInformationProvider.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java