use of org.eclipse.jface.text.contentassist.ICompletionProposalExtension3 in project eclipse.platform.text by eclipse.
the class AdditionalInfoController2 method computeInformation.
@Override
protected void computeInformation() {
if (fProposalTable == null || fProposalTable.isDisposed())
return;
TableItem[] selection = fProposalTable.getSelection();
if (selection != null && selection.length > 0) {
TableItem item = selection[0];
// compute information
String information = null;
Object d = item.getData();
if (d instanceof ICompletionProposal) {
ICompletionProposal p = (ICompletionProposal) d;
information = p.getAdditionalProposalInfo();
}
if (d instanceof ICompletionProposalExtension3)
setCustomInformationControlCreator(((ICompletionProposalExtension3) d).getInformationControlCreator());
else
setCustomInformationControlCreator(null);
// compute subject area
setMargins(4, -1);
Rectangle area = fProposalTable.getBounds();
// subject area is the whole subject control
area.x = 0;
area.y = 0;
// set information & subject area
setInformation(information, area);
}
}
use of org.eclipse.jface.text.contentassist.ICompletionProposalExtension3 in project webtools.sourceediting by eclipse.
the class JSPCompletionProposal method getInformationControlCreator.
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension3#getInformationControlCreator()
*/
public IInformationControlCreator getInformationControlCreator() {
// [277530] Use the java proposal's information control creator
ICompletionProposal javaProposal = getJavaCompletionProposal();
IInformationControlCreator informationControlCreator = null;
if (javaProposal instanceof ICompletionProposalExtension3)
informationControlCreator = ((ICompletionProposalExtension3) javaProposal).getInformationControlCreator();
return informationControlCreator;
}
Aggregations