本文整理汇总了Java中org.eclipse.jface.text.contentassist.ICompletionProposalExtension3类的典型用法代码示例。如果您正苦于以下问题:Java ICompletionProposalExtension3类的具体用法?Java ICompletionProposalExtension3怎么用?Java ICompletionProposalExtension3使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ICompletionProposalExtension3类属于org.eclipse.jface.text.contentassist包,在下文中一共展示了ICompletionProposalExtension3类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeInformation
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3; //导入依赖的package包/类
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));
}
示例2: getPrefixCompletion
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3; //导入依赖的package包/类
/**
* 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;
}
示例3: getInformationControlCreator
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3; //导入依赖的package包/类
public IInformationControlCreator getInformationControlCreator() {
return ((ICompletionProposalExtension3) jdtProposal).getInformationControlCreator();
}
示例4: getPrefixCompletionOffset
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3; //导入依赖的package包/类
/**
* 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;
}