I wrote a class that implements IJavaCompletionProposalComputer,
and my code is like the following:
final static String[] fgProposals = { "A", "B" };
final static String[] fgInfo = { "<font color='red'>A_info</font>", "B_info" };
@Override
public List<ICompletionProposal>
computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {
ICompletionProposal[] result = new ICompletionProposal[fgProposals.length];
for (int i= 0; i < fgProposals.length; i++) {
IContextInformation info = new ContextInformation("AA", "BB");
result[i]= new CompletionProposal(
fgProposals[i], context.getInvocationOffset(), 0,
fgProposals[i].length(), null, fgProposals[i],
info, fgInfo[i]);
}
return Arrays.asList(result);
}
However,
the additional info (the window at the right of the selected proposal) ignores html tags and just shows plain text.
My question is the same as this topic:
HTML Formatting in Editor ContentAssit
I've read this,
but I can't understand the explanation they said.
Could anyone tell me how to solve this question with a clearer explanation?
A simple code snippet will help a lot!!
Thanks.
[Updated on: Sun, 05 October 2014 12:34]
Report message to a moderator