registry= (IEditingSupportRegistry) fViewer;
registry.register(fModificationEditingSupport);
}
if (p instanceof ICompletionProposalExtension2) {
ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
e.apply(fViewer, trigger, stateMask, offset);
} else if (p instanceof ICompletionProposalExtension) {
ICompletionProposalExtension e= (ICompletionProposalExtension) p;
e.apply(document, trigger, offset);
} else {
p.apply(document);
}
Point selection= p.getSelection(document);
if (selection != null) {
fViewer.setSelectedRange(selection.x, selection.y);
fViewer.revealRange(selection.x, selection.y);
}
IContextInformation info= p.getContextInformation();
if (info != null) {
int position;
if (p instanceof ICompletionProposalExtension) {
ICompletionProposalExtension e= (ICompletionProposalExtension) p;
position= e.getContextInformationPosition();
} else {
if (selection == null)
selection= fViewer.getSelectedRange();
position= selection.x + selection.y;
}