You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Eric Bresie <eb...@gmail.com> on 2021/03/20 18:30:57 UTC

SQL Autocomplete Updates

This is in regards to NETBEANS-189 SQL editor, shouldn't ask every time to
set the connection.

I have created a pull request for updates relating to
https://github.com/apache/netbeans/pull/2820

This allows autocompletion to occur even if a connection has not been set.
It adds some "hints" to resolve potential issues.  The previous "dialog" no
longer opens up any more but is still available when selecting the "Connect
to Database" hint.

This is one of my first real commits to Netbeans, so there may be some
follow-up, cleanups, clarifications, so review input is greatly appreciated.

Eric Bresie
ebresie@gmail.com

Re: SQL Autocomplete Updates

Posted by Eric Bresie <eb...@gmail.com>.
So as follow up, the checks for the checkin checks seems to work on Windows
but fail for MacOS (1) and Linux (2) for reasons that don’t seem to be
applicable to the changes.

Anyone know why this may be happening?

(1) https://github.com/apache/netbeans/runs/2156420102 (MacOS)
(2) https://github.com/apache/netbeans/runs/2156419985 (Linux php cluster)


On Sat, Mar 20, 2021 at 1:30 PM Eric Bresie <eb...@gmail.com> wrote:

> This is in regards to NETBEANS-189 SQL editor, shouldn't ask every time to
> set the connection.
>
> I have created a pull request for updates relating to
> https://github.com/apache/netbeans/pull/2820
>
> This allows autocompletion to occur even if a connection has not been
> set.  It adds some "hints" to resolve potential issues.  The previous
> "dialog" no longer opens up any more but is still available when selecting
> the "Connect to Database" hint.
>
> This is one of my first real commits to Netbeans, so there may be some
> follow-up, cleanups, clarifications, so review input is greatly appreciated.
>
> Eric Bresie
> ebresie@gmail.com
>
-- 
Eric Bresie
ebresie@gmail.com

Re: SQL Autocomplete Updates

Posted by Neil C Smith <ne...@apache.org>.
On Sun, 4 Apr 2021 at 15:20, Eric Bresie <eb...@gmail.com> wrote:
> Opps...meant 12.4-Beta2 (if and when it might happen) and/or 12.5

For a moment I wondered :-)  For info, there won't be a beta 2 either
though.  The plan is that we'll feature freeze as normal ~ April 16th,
then have a number of release candidates, but be a little stricter on
the criteria for inclusion from then.  So if it's ready or close to,
then push for review and merge before April 16th.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




[NETBEANS-189] Re: SQL Autocomplete Updates [Quoters and Connections Handling]

Posted by Eric Bresie <eb...@gmail.com>.
Getting close on NETBEANS-189 [1]...

I’ve made changes to allow auto completion even without connection.  It no
longer shows the error except when attempting to execute a sql statement.
Without connection it does not allow auto completion of identifiers based
on connections.

Initially I added some hints/annotation, but these have been removed for
now.  So I’ve removed unnecessary changes from the PR so now down to 3
files have changed.

Last concern is about usage of quoter in connection vs no connection
contexts.  I have a lengthy comment in the PR thread [2] for comments

Connection are mainly done higher level in the auto completion activities
which does some establishment of a quoter used later in the flow.  With
that in mind, in lower level the  “quoter” is used to account for
connected/non-connected state.

When connection is available and attempting to provide identifier details
it may be necessary to “unquote” depending on the DB in use on the
connection.  When no connection is known there is no real way to determine
connection based details (i.e. can’t tell tables, columns, etc.) or how to
handle “unquoting/quoting” fully.

Suggested way forward is to break out / refactor some of this to allow
“connected” or “unconnected” similar logic.  So I’m trying to address this
as the moment.

So should an alternative “NoConnectionQuoter” be implemented based on
SQLIdentifier.Quoter abstract or is something else needed here?

—

There is potential follow up work to include
(1) adding hints [3]
(2) keying on “SQL auto completion” settings (see [4]
(3) re-assess agains other related SQL tickets which may be impacted

References:

[1] https://issues.apache.org/jira/browse/NETBEANS-189

[2] https://github.com/apache/netbeans/pull/2820#discussion_r615002468
[3] https://issues.apache.org/jira/browse/NETBEANS-5474

[4] https://issues.apache.org/jira/browse/NETBEANS-188




On Mon, Apr 5, 2021 at 1:56 PM Eric Bresie <eb...@gmail.com> wrote:

> It pass this time.  Thanks Neil.
>
> Can folks on the PR review, confirm the updates align with
> expected/requested changes and see if I've missed anything?
>
> I'm new to the PR process in Github...do I need to close out comments in
> the review or wait for the original reviewer to close out the given comment
> concern?
>
> Eric
>
> Eric Bresie
> ebresie@gmail.com
>
>
> On Mon, Apr 5, 2021 at 1:13 PM Neil C Smith <ne...@apache.org> wrote:
>
>> On Mon, 5 Apr 2021, 19:05 Eric Bresie, <eb...@gmail.com> wrote:
>>
>> > However now I have a "Travis CI" issue showing like the below (see
>> > https://travis-ci.com/github/apache/netbeans/jobs/496100592 ). Not sure
>> > what is causing this now.
>> >
>>
>> Have retriggered. See if it fails a second time. It's amongst a group of
>> tests that tend (or tended) to fail randomly.
>>
>> Best wishes,
>>
>> Neil
>>
>> >
>>
> --
Eric Bresie
ebresie@gmail.com

Re: SQL Autocomplete Updates

Posted by Eric Bresie <eb...@gmail.com>.
It pass this time.  Thanks Neil.

Can folks on the PR review, confirm the updates align with
expected/requested changes and see if I've missed anything?

I'm new to the PR process in Github...do I need to close out comments in
the review or wait for the original reviewer to close out the given comment
concern?

Eric
Eric Bresie
ebresie@gmail.com


On Mon, Apr 5, 2021 at 1:13 PM Neil C Smith <ne...@apache.org> wrote:

> On Mon, 5 Apr 2021, 19:05 Eric Bresie, <eb...@gmail.com> wrote:
>
> > However now I have a "Travis CI" issue showing like the below (see
> > https://travis-ci.com/github/apache/netbeans/jobs/496100592 ). Not sure
> > what is causing this now.
> >
>
> Have retriggered. See if it fails a second time. It's amongst a group of
> tests that tend (or tended) to fail randomly.
>
> Best wishes,
>
> Neil
>
> >
>

Re: SQL Autocomplete Updates

Posted by Neil C Smith <ne...@apache.org>.
On Mon, 5 Apr 2021, 19:05 Eric Bresie, <eb...@gmail.com> wrote:

> However now I have a "Travis CI" issue showing like the below (see
> https://travis-ci.com/github/apache/netbeans/jobs/496100592 ). Not sure
> what is causing this now.
>

Have retriggered. See if it fails a second time. It's amongst a group of
tests that tend (or tended) to fail randomly.

Best wishes,

Neil

>

Re: SQL Autocomplete Updates

Posted by Eric Bresie <eb...@gmail.com>.
I missed a java-hint reference in the "project.xml" file which referenced
it.  This appears to resolve the check issues.

However now I have a "Travis CI" issue showing like the below (see
https://travis-ci.com/github/apache/netbeans/jobs/496100592 ). Not sure
what is causing this now.

I thought I'd seen an empty test "hints" folder on my local development
environment somewhere under here
(netbeans\ide\db.sql.editor\test\unit\src\org\netbeans\modules\db\sql\editor\)
which I removed locally but I don't see it elsewhere (nor does the
"deleted" folder seem to get noticed in Netbeans git when I check for
changes...unless I'm completely missing it, I don't see that as part of the
PR or recent commits currently.

BUILD FAILED
12419/home/travis/build/apache/netbeans/nbbuild/templates/common.xml:724:
The following error occurred while executing this line:
12420/home/travis/build/apache/netbeans/nbbuild/templates/common.xml:717:
The following error occurred while executing this line:
12421/home/travis/build/apache/netbeans/nbbuild/templates/common.xml:751:
The following error occurred while executing this line:
12422/home/travis/build/apache/netbeans/nbbuild/templates/common.xml:748:
Some tests failed; see details above.
12423
12424Total time: 26 minutes 38 seconds
12425The command "ant $OPTS -Dtest.config=batch2-vanilla-javac -f
java/java.hints test" exited with 1.
cache.2
12426store build cache
124270.00s1.96snothing changed


Eric Bresie
ebresie@gmail.com


On Sun, Apr 4, 2021 at 9:20 AM Eric Bresie <eb...@gmail.com> wrote:

> Opps...meant 12.4-Beta2 (if and when it might happen) and/or 12.5
>
> I did want to reach out regarding the CI build based on the PR updates.
>
> The Windows job is success but I seem to be getting some issues with some
> of the other Unix platforms and checks like for  “ Linux build of PHP
> cluster”  like the below.
>
> I don’t recall changing anything around this so I’m assuming either I
> missed something (maybe in sql editor context there is something
> implemented against a deprecated spi.java.queries interface) or there is
> some ongoing change elsewhere impacting this.
>
> Anyone have any thoughts or suggestions?
>
>
> [parseprojectxml]
> /home/runner/work/netbeans/netbeans/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/save/FormatingTest.java:22:
> warning: [deprecation] SourceLevelQueryImplementation in
> org.netbeans.spi.java.queries has been deprecated
> 7683
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7683>[parseprojectxml]
> import org.netbeans.spi.java.queries.SourceLevelQueryImplementation;
> 7684
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7684>[parseprojectxml]
> ^
> 7685
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7685>[parseprojectxml]
> /home/runner/work/netbeans/netbeans/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/save/FormatingTest.java:48:
> error: cannot find symbol
> 7686
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7686>[parseprojectxml]
> import org.netbeans.modules.java.JavaDataLoader;
> 7687
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7687>[parseprojectxml]
> ^
> 7688
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7688>[parseprojectxml]
> symbol: class JavaDataLoader
> 7689
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7689>[parseprojectxml]
> location: package org.netbeans.modules.java
> 7690
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7690>
> 7691
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7691>BUILD
> FAILED
> 7692
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7692>/home/runner/work/netbeans/netbeans/nbbuild/templates/projectized.xml:148:
> The following error occurred while executing this line:
> 7693
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7693>/home/runner/work/netbeans/netbeans/nbbuild/templates/projectized.xml:148:
> The following error occurred while executing this line:
> 7694
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7694>/home/runner/work/netbeans/netbeans/nbbuild/templates/projectized.xml:148:
> The following error occurred while executing this line:
> 7695
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7695>/home/runner/work/netbeans/netbeans/nbbuild/templates/common.xml:652:
> The following error occurred while executing this line:
> 7696
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7696>/home/runner/work/netbeans/netbeans/nbbuild/templates/common.xml:630:
> Compile failed; see the compiler error output for details.
> 7697
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7697>
> 7698
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7698>Total
> time: 28 seconds
> 7699
> <https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7699>[parseprojectxml]
> 13 errors
>
> On Sat, Apr 3, 2021 at 10:37 AM Eric Bresie <eb...@gmail.com> wrote:
>
>> I've checked in additional updates on this PR based on feedback from the
>> PR comments.
>> - I've removed the "Annotation" which prevents the need for the java icon
>> referenced
>> - I've removed commented code (unless I've missed any still)
>> - I've addressed the case for select * from | concern
>>
>> I believe I've addressed most concerns, but wanted confirmation.
>>
>> Please review and see if this is better and getting closer for eventual
>> inclusions (not sure if this is 12.3 beta2 or 12.4 candidate).
>>
>>
>>
>> Eric Bresie
>> ebresie@gmail.com
>>
>>
>> On Sat, Mar 20, 2021 at 1:30 PM Eric Bresie <eb...@gmail.com> wrote:
>>
>>> This is in regards to NETBEANS-189 SQL editor, shouldn't ask every time
>>> to set the connection.
>>>
>>> I have created a pull request for updates relating to
>>> https://github.com/apache/netbeans/pull/2820
>>>
>>> This allows autocompletion to occur even if a connection has not been
>>> set.  It adds some "hints" to resolve potential issues.  The previous
>>> "dialog" no longer opens up any more but is still available when selecting
>>> the "Connect to Database" hint.
>>>
>>> This is one of my first real commits to Netbeans, so there may be some
>>> follow-up, cleanups, clarifications, so review input is greatly appreciated.
>>>
>>> Eric Bresie
>>> ebresie@gmail.com
>>>
>> --
> Eric Bresie
> ebresie@gmail.com
>

Re: SQL Autocomplete Updates

Posted by Eric Bresie <eb...@gmail.com>.
Opps...meant 12.4-Beta2 (if and when it might happen) and/or 12.5

I did want to reach out regarding the CI build based on the PR updates.

The Windows job is success but I seem to be getting some issues with some
of the other Unix platforms and checks like for  “ Linux build of PHP
cluster”  like the below.

I don’t recall changing anything around this so I’m assuming either I
missed something (maybe in sql editor context there is something
implemented against a deprecated spi.java.queries interface) or there is
some ongoing change elsewhere impacting this.

Anyone have any thoughts or suggestions?


[parseprojectxml]
/home/runner/work/netbeans/netbeans/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/save/FormatingTest.java:22:
warning: [deprecation] SourceLevelQueryImplementation in
org.netbeans.spi.java.queries has been deprecated
7683
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7683>[parseprojectxml]
import org.netbeans.spi.java.queries.SourceLevelQueryImplementation;
7684
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7684>[parseprojectxml]
^
7685
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7685>[parseprojectxml]
/home/runner/work/netbeans/netbeans/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/save/FormatingTest.java:48:
error: cannot find symbol
7686
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7686>[parseprojectxml]
import org.netbeans.modules.java.JavaDataLoader;
7687
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7687>[parseprojectxml]
^
7688
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7688>[parseprojectxml]
symbol: class JavaDataLoader
7689
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7689>[parseprojectxml]
location: package org.netbeans.modules.java
7690
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7690>
7691
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7691>BUILD
FAILED
7692
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7692>/home/runner/work/netbeans/netbeans/nbbuild/templates/projectized.xml:148:
The following error occurred while executing this line:
7693
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7693>/home/runner/work/netbeans/netbeans/nbbuild/templates/projectized.xml:148:
The following error occurred while executing this line:
7694
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7694>/home/runner/work/netbeans/netbeans/nbbuild/templates/projectized.xml:148:
The following error occurred while executing this line:
7695
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7695>/home/runner/work/netbeans/netbeans/nbbuild/templates/common.xml:652:
The following error occurred while executing this line:
7696
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7696>/home/runner/work/netbeans/netbeans/nbbuild/templates/common.xml:630:
Compile failed; see the compiler error output for details.
7697
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7697>
7698
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7698>Total
time: 28 seconds
7699
<https://github.com/apache/netbeans/pull/2820/checks?check_run_id=2260507762#step:8:7699>[parseprojectxml]
13 errors

On Sat, Apr 3, 2021 at 10:37 AM Eric Bresie <eb...@gmail.com> wrote:

> I've checked in additional updates on this PR based on feedback from the
> PR comments.
> - I've removed the "Annotation" which prevents the need for the java icon
> referenced
> - I've removed commented code (unless I've missed any still)
> - I've addressed the case for select * from | concern
>
> I believe I've addressed most concerns, but wanted confirmation.
>
> Please review and see if this is better and getting closer for eventual
> inclusions (not sure if this is 12.3 beta2 or 12.4 candidate).
>
>
>
> Eric Bresie
> ebresie@gmail.com
>
>
> On Sat, Mar 20, 2021 at 1:30 PM Eric Bresie <eb...@gmail.com> wrote:
>
>> This is in regards to NETBEANS-189 SQL editor, shouldn't ask every time
>> to set the connection.
>>
>> I have created a pull request for updates relating to
>> https://github.com/apache/netbeans/pull/2820
>>
>> This allows autocompletion to occur even if a connection has not been
>> set.  It adds some "hints" to resolve potential issues.  The previous
>> "dialog" no longer opens up any more but is still available when selecting
>> the "Connect to Database" hint.
>>
>> This is one of my first real commits to Netbeans, so there may be some
>> follow-up, cleanups, clarifications, so review input is greatly appreciated.
>>
>> Eric Bresie
>> ebresie@gmail.com
>>
> --
Eric Bresie
ebresie@gmail.com

Re: SQL Autocomplete Updates

Posted by Eric Bresie <eb...@gmail.com>.
I've checked in additional updates on this PR based on feedback from the PR
comments.
- I've removed the "Annotation" which prevents the need for the java icon
referenced
- I've removed commented code (unless I've missed any still)
- I've addressed the case for select * from | concern

I believe I've addressed most concerns, but wanted confirmation.

Please review and see if this is better and getting closer for eventual
inclusions (not sure if this is 12.3 beta2 or 12.4 candidate).



Eric Bresie
ebresie@gmail.com


On Sat, Mar 20, 2021 at 1:30 PM Eric Bresie <eb...@gmail.com> wrote:

> This is in regards to NETBEANS-189 SQL editor, shouldn't ask every time to
> set the connection.
>
> I have created a pull request for updates relating to
> https://github.com/apache/netbeans/pull/2820
>
> This allows autocompletion to occur even if a connection has not been
> set.  It adds some "hints" to resolve potential issues.  The previous
> "dialog" no longer opens up any more but is still available when selecting
> the "Connect to Database" hint.
>
> This is one of my first real commits to Netbeans, so there may be some
> follow-up, cleanups, clarifications, so review input is greatly appreciated.
>
> Eric Bresie
> ebresie@gmail.com
>