if (start) {
if (fViewer != null && fAutoAssistListener == null) {
fAutoAssistListener= new AutoAssistListener();
if (fViewer instanceof ITextViewerExtension) {
ITextViewerExtension extension= (ITextViewerExtension) fViewer;
extension.appendVerifyKeyListener(fAutoAssistListener);
} else {
StyledText textWidget= fViewer.getTextWidget();
if (Helper2.okToUse(textWidget))
textWidget.addVerifyKeyListener(fAutoAssistListener);
}
}
} else if (fAutoAssistListener != null) {
if (fViewer instanceof ITextViewerExtension) {
ITextViewerExtension extension= (ITextViewerExtension) fViewer;
extension.removeVerifyKeyListener(fAutoAssistListener);
} else {
StyledText textWidget= fViewer.getTextWidget();
if (Helper2.okToUse(textWidget))
textWidget.removeVerifyKeyListener(fAutoAssistListener);
}