use of org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput in project che by eclipse.
the class AbstractJavaCompletionProposal method getAdditionalProposalInfo.
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension5#getAdditionalProposalInfo(org.eclipse.core.runtime.IProgressMonitor)
*/
public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
if (getProposalInfo() != null) {
String info = getProposalInfo().getInfo(monitor);
if (info != null && info.length() > 0) {
StringBuffer buffer = new StringBuffer();
HTMLPrinter.insertPageProlog(buffer, 0, getCSSStyles());
buffer.append(info);
IJavaElement element = null;
try {
element = getProposalInfo().getJavaElement();
if (element instanceof IMember) {
//TODO
// String base= JavaDocLocations.getBaseURL(element, ((IMember)element).isBinary());
// if (base != null) {
// int endHeadIdx= buffer.indexOf("</head>"); //$NON-NLS-1$
// buffer.insert(endHeadIdx, "\n<base href='" + base + "'>\n"); //$NON-NLS-1$ //$NON-NLS-2$
// }
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
HTMLPrinter.addPageEpilog(buffer);
info = buffer.toString();
return new JavadocBrowserInformationControlInput(info);
}
}
return null;
}
Aggregations