Bug 40787 [plan item] Affordance for F2 opportunity in Java editor
There should be a small label explaining that F2 pins the hover.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java
public SourceViewerInformationControl(Shell parent) {
		this(parent, SWT.NONE);
	}
	
	/*
	 * @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
	 */
	public void setInput(Object input) {
		if (input instanceof String)
			setInformation((String)input);
		else
			setInformation(null);
	}
	/*
	 * @see IInformationControl#setInformation(String)
	 */
	public void setInformation(String content) {
		if (content == null) {
			fViewer.setInput(null);
			return;
		}
				
		IDocument doc= new Document(content);
		IDocumentPartitioner dp= JavaPlugin.getDefault().getJavaTextTools().createDocumentPartitioner();
		if (dp != null) {
			doc.setDocumentPartitioner(dp);
			dp.connect(doc);
		}
		fViewer.setInput(doc);
	}