ICompletionProposal[] oldProposals = computeCompletionProposals( position );
IContentProposal[] proposals = new IContentProposal[oldProposals.length];
for ( int i = 0; i < oldProposals.length; i++ )
{
final ICompletionProposal oldProposal = oldProposals[i];
final Document document = new Document( contents );
oldProposal.apply( document );
proposals[i] = new IContentProposal()
{
public String getContent()
{
return document.get();
}
public int getCursorPosition()
{
return oldProposal.getSelection( document ).x;
}
public String getDescription()
{
return oldProposal.getAdditionalProposalInfo();
}
public String getLabel()
{
return oldProposal.getDisplayString();
}
public String toString()
{