Looking through javadocs and also found the following which may help me...

https://platform.netbeans.org/tutorials/nbm-code-completion.html

Eric Bresie
[email protected]


On Fri, Feb 19, 2021 at 9:27 AM Eric Bresie <[email protected]> wrote:

> Started looking through the code and noticed in the SQLCompletionProvider
> the below comment...
>
>     private static TokenSequence<SQLTokenId> getSQLTokenSequence(Document
> doc) {
>         // Hack until the SQL editor is entirely ported to the Lexer API
>
> Not sure this would get done yet, but what would be involved in "porting
> to the Lexer API"?
>
> Eric Bresie
> [email protected]
>
>
> On Sun, Feb 14, 2021 at 3:02 AM Matthias Bläsing <
> [email protected]> wrote:
>
>> 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
>>
>>
>>
>>

Reply via email to