Hi Eric, Am Samstag, den 13.02.2021, 18:45 -0600 schrieb Eric Bresie: > As a first bug fix, I thought I’d try working some on the SQL > Autocompletion related issue like > > NETBEANS-188 Please add support for code completion while typing > > [...] > > What is the best approach to start on this? In the SQL Editor project, I > find a number test cases like the one for select but I’m a little unclear > of the flow for how key input ends up in the autocomplete logic and how to > determines the tokens for use in that and where the check for the > connection happens.
the starting point for the code completion is in SQLCompletionProvider (module SQL Editor). The provider is registered in the layer (layer.xml, line 56). if I understand the sequence correctly, first #getAutoQueryTypes is invoced to check whether a popup with suggestions should be shown without the user explicitly asking for it. If either #getAutoQueryTypes return a non-zero value or the user explicitly asks for completion, #createTask is invoked with the requested type. In case of SQL it is org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery. I see options to provide quick completion based on SQL grammer, with additional completion when a db connection is established. Does this help already? Greetings Matthias --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
