Java 类org.eclipse.jface.text.contentassist.ICompletionProposalExtension3 实例源码

项目:APICloud-Studio    文件:AdditionalInfoController.java   
protected void computeInformation()
{
    if (fProposal instanceof ICompletionProposalExtension3)
    {
        setCustomInformationControlCreator(((ICompletionProposalExtension3) fProposal)
                .getInformationControlCreator());
    }
    else
    {
        setCustomInformationControlCreator(null);
    }

    // compute subject area
    Point size = fProposalTable.getShell().getSize();

    // set information & subject area
    setInformation(fInformation, new Rectangle(0, 0, size.x, size.y));
}
项目:APICloud-Studio    文件:CompletionProposalPopup.java   
/**
 * Extracts the replacement string from an <code>ICompletionProposal</code>. If <code>proposal</code> is a
 * <code>ICompletionProposalExtension3</code>, its <code>getCompletionText</code> method is called, otherwise, the
 * display string is used.
 * 
 * @param proposal
 *            the proposal to extract the text from
 * @return the proposals completion text
 * @since 3.1
 */
private CharSequence getPrefixCompletion(ICompletionProposal proposal)
{
    CharSequence insertion = null;
    if (proposal instanceof ICompletionProposalExtension3)
    {
        insertion = ((ICompletionProposalExtension3) proposal).getPrefixCompletionText(
                fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset);
    }

    if (insertion == null)
    {
        insertion = proposal.getDisplayString();
    }

    return insertion;
}
项目:gwt-eclipse-plugin    文件:JsniCompletionProposal.java   
public IInformationControlCreator getInformationControlCreator() {
  return ((ICompletionProposalExtension3) jdtProposal).getInformationControlCreator();
}
项目:APICloud-Studio    文件:CompletionProposalPopup.java   
/**
 * Extracts the completion offset of an <code>ICompletionProposal</code>. If <code>proposal</code> is a
 * <code>ICompletionProposalExtension3</code>, its <code>getCompletionOffset</code> method is called, otherwise, the
 * invocation offset of this popup is shown.
 * 
 * @param proposal
 *            the proposal to extract the offset from
 * @return the proposals completion offset, or <code>fInvocationOffset</code>
 * @since 3.1
 */
private int getPrefixCompletionOffset(ICompletionProposal proposal)
{
    if (proposal instanceof ICompletionProposalExtension3)
    {
        return ((ICompletionProposalExtension3) proposal).getPrefixCompletionStart(
                fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset);
    }
    return fInvocationOffset;
}