Search in sources :

Example 1 with TextFieldWithCompletion

use of com.intellij.util.textCompletion.TextFieldWithCompletion in project intellij-community by JetBrains.

the class MultilinePopupBuilder method createTextField.

@NotNull
private static EditorTextField createTextField(@NotNull Project project, Collection<String> values, boolean supportsNegativeValues, @NotNull 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;
}
Also used : EditorEx(com.intellij.openapi.editor.ex.EditorEx) TextFieldWithCompletion(com.intellij.util.textCompletion.TextFieldWithCompletion) CompoundBorder(javax.swing.border.CompoundBorder) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

EditorEx (com.intellij.openapi.editor.ex.EditorEx)1 TextFieldWithCompletion (com.intellij.util.textCompletion.TextFieldWithCompletion)1 CompoundBorder (javax.swing.border.CompoundBorder)1 NotNull (org.jetbrains.annotations.NotNull)1