类org.eclipse.jface.text.contentassist.ICompletionProposalExtension5源码实例Demo

下面列出了怎么用org.eclipse.jface.text.contentassist.ICompletionProposalExtension5的API类实例代码及写法,或者点击链接到github查看源代码。

public void run()
{
	final ICompletionProposalExtension5 proposal = getCurrentProposalEx();
	Job job = new Job(JFaceTextMessages.getString("AdditionalInfoController.job_name")) //$NON-NLS-1$
	{
		protected IStatus run(IProgressMonitor monitor)
		{
			Object info;
			try
			{
				info = proposal.getAdditionalProposalInfo(monitor);
			}
			catch (RuntimeException x)
			{
				/*
				 * XXX: This is the safest fix at this point so close to end of 3.2. Will be revisited when
				 * fixing https://bugs.eclipse.org/bugs/show_bug.cgi?id=101033
				 */
				return new Status(IStatus.WARNING, "com.aptana.ui.epl", IStatus.OK, "", x); //$NON-NLS-1$ //$NON-NLS-2$
			}
			setInfo((ICompletionProposal) proposal, info);
			return new Status(IStatus.OK, "com.aptana.ui.epl", IStatus.OK, "", null); //$NON-NLS-1$ //$NON-NLS-2$
		}
	};
	job.schedule();
}
 
private boolean isExt5(ICompletionProposal p)
{
	return p instanceof ICompletionProposalExtension5;
}
 
ICompletionProposalExtension5 getCurrentProposalEx()
{
	Assert.isTrue(fCurrentProposal instanceof ICompletionProposalExtension5);
	return (ICompletionProposalExtension5) fCurrentProposal;
}
 
 类所在包
 类方法
 同包方法