Okay the previous helps a great deal...

I've updated to the points where it basically ignores the db connection
aspect (for now) and allows SQL autocomplete to work so far.

I'm emphasizing the case when there are no connections for now.  When there
are no connections available, I wanted to add some connection options (i.e.
create, select connection, logon to connection, etc.).  Figured during this
context it could establish connection and populate the metadata at that
time.

How does one link up an item to do another activity like open up another
dialog (i.e. for "create" link to "New Connection Wizard") based on a given
selected item?

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