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

项目:APICloud-Studio    文件:AdditionalInfoController.java   
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();
}
项目:APICloud-Studio    文件:AdditionalInfoController.java   
private boolean isExt5(ICompletionProposal p)
{
    return p instanceof ICompletionProposalExtension5;
}
项目:APICloud-Studio    文件:AdditionalInfoController.java   
ICompletionProposalExtension5 getCurrentProposalEx()
{
    Assert.isTrue(fCurrentProposal instanceof ICompletionProposalExtension5);
    return (ICompletionProposalExtension5) fCurrentProposal;
}