Text Field Autocompletion similar to FileTextFieldImpl

Answered

Hi, all.

I've noticed that the com.intellij.openapi.ui.TextFieldWithBrowseButton has a path completion mechanism built right in to it, using Ctrl+Space. I think this is an awesome feature, and I would like to do something similar for another text field. I'd like to automatically suggest and precomplete certain words for that field. Unfortunately, the path completion in TextFieldWithBrowseButton seems to be specifically geared toward completing file paths, with no way to extend or customize it. Digging a bit into the IDEA source, the path completion popup seems to be handled by the com.intellij.openapi.fileChooser.ex.FileTextFieldImpl class, which doesn't appear to be customizable.

Before coding my own class to replicate the functionality of FileTextFieldImpl, I'd like to ask if there is another way to accomplish what I'm trying to do. The text field and the words I'm suggesting don't belong to a Language, so I don't think an EditorTextField is the right choice for me. Any help would be much appreciated.

Thanks,
JP

1 comment
Comment actions Permalink

Please see com.intellij.ui.TextFieldWithAutoCompletion

0

Please sign in to leave a comment.