本文整理匯總了Java中org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput類的典型用法代碼示例。如果您正苦於以下問題:Java JavadocBrowserInformationControlInput類的具體用法?Java JavadocBrowserInformationControlInput怎麽用?Java JavadocBrowserInformationControlInput使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
JavadocBrowserInformationControlInput類屬於org.eclipse.jdt.internal.ui.text.java.hover包,在下文中一共展示了JavadocBrowserInformationControlInput類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getAdditionalProposalInfo
import org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput; //導入依賴的package包/類
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;
}
示例2: getAdditionalProposalInfo
import org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput; //導入依賴的package包/類
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) {
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(null, element, info, 0);
}
}
return null;
}
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:32,代碼來源:AbstractJavaCompletionProposal.java
示例3: getAdditionalProposalInfo
import org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput; //導入依賴的package包/類
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) {
String base= JavaDocLocations.getBaseURL((IMember) element);
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(null, element, info, 0);
}
}
return null;
}
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion-Juno38,代碼行數:32,代碼來源:AbstractJavaCompletionProposal.java