use of org.eclipse.swt.events.TraverseEvent in project eclipse.platform.text by eclipse.
the class ContentAssistant method install.
protected void install() {
fLayoutManager = new LayoutManager();
fInternalListener = new InternalListener();
AdditionalInfoController controller = null;
if (fInformationControlCreator != null)
controller = new AdditionalInfoController(fInformationControlCreator, OpenStrategy.getPostSelectionDelay());
fContextInfoPopup = fContentAssistSubjectControlAdapter.createContextInfoPopup(this);
fProposalPopup = fContentAssistSubjectControlAdapter.createCompletionProposalPopup(this, controller, fAsynchronous);
fProposalPopup.setSorter(fSorter);
registerHandler(SELECT_NEXT_PROPOSAL_COMMAND_ID, fProposalPopup.createProposalSelectionHandler(CompletionProposalPopup.ProposalSelectionHandler.SELECT_NEXT));
registerHandler(SELECT_PREVIOUS_PROPOSAL_COMMAND_ID, fProposalPopup.createProposalSelectionHandler(CompletionProposalPopup.ProposalSelectionHandler.SELECT_PREVIOUS));
if (Helper.okToUse(fContentAssistSubjectControlAdapter.getControl())) {
fContentAssistSubjectControlShell = fContentAssistSubjectControlAdapter.getControl().getShell();
fCASCSTraverseListener = new TraverseListener() {
@Override
public void keyTraversed(TraverseEvent e) {
if (e.detail == SWT.TRAVERSE_ESCAPE && isProposalPopupActive())
e.doit = false;
}
};
fContentAssistSubjectControlShell.addTraverseListener(fCASCSTraverseListener);
}
manageAutoActivation(fIsAutoActivated);
}
Aggregations