bobbylight / AutoComplete

A code completion library for Swing text components, with special support for RSyntaxTextArea.
BSD 3-Clause "New" or "Revised" License
166 stars 55 forks source link

Enhanced completion proposals in Parameter completion #45

Open kovadam69 opened 7 years ago

kovadam69 commented 7 years ago

I added IntelliJ like parameter completion proposals beside the current case-insensitive completion proposals. This means if user inputs chThVarO will match the variable name checkThisVariableOut. These methods are in the Util class, and this is also used in the RSTALanguageSupport in Java language completion for method/field completion proposals. Beside it has some small fix regarding memory issues and window disposal.

kovadam69 commented 7 years ago

Slightly modified AutoCompletion class to add ability to show a method parameter tooltip when user presses the Ctrl-P (can be changed). Currently this is used in JavaCompletionProvider, but should work for all other providers as well, either showing nothing, or if the provider does return some meaningful ParameterizedCompletion list, it will be shown to the user. The tooltip disappears when user presses Ctrl-Space, ESCAPE or leaves the method boundaries (exits the space between ( and ) or line end ). If multiple ParameterizedCompletion is returned, multiple tooltips are placed below each other.