use of org.eclipse.wst.xml.ui.internal.contentassist.MarkupCompletionProposal in project sling by apache.
the class ProposalComputer method addAttributeProposal.
private void addAttributeProposal(final ContentAssistRequest contentAssistRequest, ProposalDescription proposalDescription) {
String replacementString = proposalDescription.getInsertionText();
int replacementOffset = contentAssistRequest.getReplacementBeginPosition();
int replacementLength = contentAssistRequest.getReplacementLength();
int cursorPosition = getCursorPositionForProposedText(replacementString);
ICompletionProposal proposal = new MarkupCompletionProposal(replacementString.toString(), replacementOffset, replacementLength, cursorPosition, SharedImages.SIGHTLY_ICON.createImage(), proposalDescription.getLabel(), null, proposalDescription.getAdditionalInfo(), XMLRelevanceConstants.R_TAG_NAME);
contentAssistRequest.addProposal(proposal);
}
Aggregations