Java 类com.intellij.ui.EditorTextFieldProvider 实例源码

项目:intellij-ce-playground    文件:MultilinePopupBuilder.java   
@NotNull
private static EditorTextField createTextField(@NotNull Project project) {
  final EditorTextFieldProvider service = ServiceManager.getService(project, EditorTextFieldProvider.class);
  List<EditorCustomization> features = ContainerUtil.packNullables(SoftWrapsEditorCustomization.ENABLED,
                                                                   SpellCheckingEditorCustomizationProvider.getInstance().getDisabledCustomization());
  EditorTextField textField = service.getEditorField(FileTypes.PLAIN_TEXT.getLanguage(), project, features);
  textField.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2), textField.getBorder()));
  textField.setOneLineMode(false);
  return textField;
}
项目:review-board-idea-plugin    文件:MultiValueAutoComplete.java   
public static EditorTextField create(Project project, DataProvider dataProvider) {
    List<EditorCustomization> customizations =
            Arrays.<EditorCustomization>asList(SoftWrapsEditorCustomization.ENABLED, SpellCheckingEditorCustomization.DISABLED);
    EditorTextField editorField = ServiceManager.getService(project, EditorTextFieldProvider.class)
            .getEditorField(FileTypes.PLAIN_TEXT.getLanguage(), project, customizations);
    new CommaSeparatedTextFieldCompletion(dataProvider).apply(editorField);
    return editorField;

}