private static class CodeEditorFactory extends AutoCompleterFactory {
@Override
public AutoCompleter createAutoCompleter(CompletionContext context) {
CodeEditorAutoCompleter ac = new CodeEditorAutoCompleter();
ac.setGrabFocusAfterCompletion(getGrabFocus());
DefaultTokenChooser tc = new DefaultTokenChooser();
tc.setListFactory(getListFactory());
tc.setMaxWidth(getMaxCharsWidth());
ac.setTokenChooser(tc);
ac.setCompletionContext(context);
return ac;
}