Eclipse plugin 在Eclipse插件中,如何在内容辅助弹出窗口旁边显示额外的信息弹出窗口?

Eclipse plugin 在Eclipse插件中,如何在内容辅助弹出窗口旁边显示额外的信息弹出窗口?,eclipse-plugin,content-assist,Eclipse Plugin,Content Assist,我正在尝试实现我自己的内容辅助,我不能为我在内容辅助弹出窗口中得到的每个提案添加带有附加信息的弹出窗口 我尝试使用以下实现,但不起作用: public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) { ICompletionProposal[] result= new ICompletionProposal[fgProposals.length];

我正在尝试实现我自己的内容辅助,我不能为我在内容辅助弹出窗口中得到的每个提案添加带有附加信息的弹出窗口

我尝试使用以下实现,但不起作用:

public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
    ICompletionProposal[] result= new ICompletionProposal[fgProposals.length];
    for (int i= 0; i < fgProposals.length; i++) {
        result[i]= new CompletionProposal(fgProposals[i], documentOffset, 0, fgProposals[i].length(), null, fgProposals[i], info, MessageFormat.format(JavaEditorMessages.getString("CompletionProcessor.Proposal.hoverinfo.pattern"), new Object[] { fgProposals[i]})); //$NON-NLS-1$
    }
    return result;
}
public ICompletionProposal[]ComputeCompletionProposal(ITextViewer查看器,int documentOffset){
ICompletionProposal[]结果=新ICompletionProposal[fgPropositions.length];
for(int i=0;i

我还尝试使用上下文信息,但是我认为这不是我要找的,而且我不能同时显示上下文信息和内容辅助。

如果您使用默认的
ContentAssistant
您需要调用
setInformationControlCreator
来设置用于创建此附加信息弹出窗口的代码

SourceViewerConfiguration
中执行此操作的常用方法是:

public IContentAssistant getContentAssistant(最终版ISourceViewer sourceViewer)
{
最终的ContentAssistant=新的ContentAssistant();
…其他设置。。。
setInformationControlCreator(getInformationControlCreator(sourceViewer));
返回助理;
}