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

项目:consulo    文件:MultilinePopupBuilder.java   
@Nonnull
private static EditorTextField createTextField(@Nonnull Project project,
                                               Collection<String> values,
                                               boolean supportsNegativeValues,
                                               @Nonnull String initialValue) {
  TextFieldWithCompletion textField =
          new TextFieldWithCompletion(project, new MyCompletionProvider(values, supportsNegativeValues), initialValue, false, true, false) {
            @Override
            protected EditorEx createEditor() {
              EditorEx editor = super.createEditor();
              SoftWrapsEditorCustomization.ENABLED.customize(editor);
              return editor;
            }
          };
  textField.setBorder(new CompoundBorder(JBUI.Borders.empty(2), textField.getBorder()));
  return textField;
}
项目: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;

}