Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Content Assist Proposal Info with HTML Format
Content Assist Proposal Info with HTML Format [message #1436003] Thu, 02 October 2014 08:41
Xavier Lin is currently offline Xavier LinFriend
Messages: 1
Registered: October 2014
Junior Member
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

Previous Topic:problem in my app work
Next Topic:[Q] Eclipse Luna : Strange Crash!
Goto Forum:
  


Current Time: Fri Apr 19 11:49:10 GMT 2024

Powered by FUDForum. Page generated in 0.02187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top