[NETBEANS-189] Updates for Sql autocomplete - #2820
Conversation
…ints for possible connection issues (i.e. new driver, new connection, connect - showing existing dialog.
…ints for possible connection issues (i.e. new driver, new connection, connect - showing existing dialog.
|
As you already mentioned in your mail, because of the HINTS and FIX, I think so too, that we should separate it. It is out of scope of the ticket and it would be better to have a separated packege/folder whatever where we have SQL Editor related hints and fixes. My 2 cents. |
matthiasblaesing
left a comment
There was a problem hiding this comment.
I think this needs cleanup before it can be merged. Primarily only changes, that should be in master (and are working) should be in this PR. I left some comments inline, which might help.
My concern right now, that this opens a completly new can of worms, because the core assumption ("real" completion only happens when a connection is available) is no broken. I saw some guards added, but yet I managed to get this:
java.lang.NullPointerException
at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.completeSimpleIdentBasedOnFromClause(SQLCompletionQuery.java:683)
at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.completeColumnWithDefinedTuple(SQLCompletionQuery.java:501)
at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.completeSelect(SQLCompletionQuery.java:268)
at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.doQuery(SQLCompletionQuery.java:211)
at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.doQuery(SQLCompletionQuery.java:152)
at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.query(SQLCompletionQuery.java:101)
at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:198)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Caused: org.openide.util.RequestProcessor$FastItem: task failed due to
from a simple query (completion was invoked at |):
select * from x WHERE |;
| } else { | ||
| if (quoter == null) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Looks strange (see above).
I have created NETBEANS-5474 Add SQL Hints for use during editing to capture changes associated with adding hints to SQL. |
|
Just interesting is it related commit #2558? |
|
There may be a little overlap with that. That one updates the config
screen for auto completion. I think the configuration there could be used
here as well as another check (I think I may have put a todo to do so but
didn’t do anything on that yet).
On Sun, Mar 21, 2021 at 1:46 PM Los Vitaly ***@***.***> wrote:
Just interesting is it related commit #2558
<#2558>?
I see some dead commits are from 2019
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2820 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC2RTUEKCWUGE2DZ2VWXUDTEY5JZANCNFSM4ZQVPDDQ>
.
--
Eric Bresie
***@***.***
|
…associated with them.
…ich is no longer used.
|
I suggest to clean this up, remove all unnessary changes, squash and force push. I also notice, that no reference to an issue is given, so the changes are not tracked in jira. |
Sorry, I've not done a lot of squashing and force pushes. Any guidance or pointers to that? Is that something doable within github, Netbeans git, or git command prompt verIon? |
As indicate, I've added the ticket reference [NETBEANS-189] to the PR title and the PR is linked on the NETBEANS ticket. Let me know if anything else is needed here. |
I think the git integration in netbeans is missing a force-push option, so I would use the git cli client: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History After the history is cleaned up, you can do a forced push to the tracking branch on github and the PR will be updated with that. The intention is here to get a clean baseline (and loose all unintended changes) and should be used with care. |
|
Okay apparently the adding of the notification as part of ide/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionQuery.java broke unit tests. I believe the problem has to do with the dialog opening and waiting for someone to click the button. I assume may need to back this out and/or find a better place to trigger the notification. |
…into sql_autocomplete
|
I've squashed most of the changes together. So hopefully it's just about ready fro inclusion. |
…into sql_autocomplete Reverted layer.xml file to previous version
…into sql_autocomplete
…into sql_autocomplete Reverted unneeded layer.xml and Bundle.properties changes
…into sql_autocomplete
…into sql_autocomplete Revert changes on project.xml file removing hint and parser dependencies.
…into sql_autocomplete
|
I have raised "NETBEANS-5831 Create a SQL Standard Quoter for Use with Connectionless Cases" to accomidate refactoring elements in the above. |
|
hi @ebresie would be good if you can squash and force push to "remove" from history the technical commit. git rebase -i HEAD~20 (shoud match hash of you commits) edit commit message maybe choose the one with Issue number apply the rebase if everything is OK |
Removed hint dependency
Removed unused variables including hint variable
|
change requested moving to 12.6 |
|
To reduce the confusion, I would like to close this PR and replaced with a "clean" PR (see #3074) which can be used going forward. If this is acceptable, then will need the milestones, tags, labels, reviews to be addressed. |
|
Closing this in favor of #3074 |
This allows autocompletion to be possible when no connection is yet established.