ebresie commented on a change in pull request #2820: URL: https://github.com/apache/netbeans/pull/2820#discussion_r606678566
########## File path: ide/db.sql.editor/nbproject/project.xml ########## @@ -1,341 +1,364 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - ---> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.apisupport.project</type> - <configuration> - <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> - <code-name-base>org.netbeans.modules.db.sql.editor</code-name-base> - <module-dependencies> - <dependency> - <code-name-base>org.netbeans.modules.csl.api</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>2</release-version> - <specification-version>2.27</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.csl.types</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.db</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <implementation-version/> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.db.core</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.db.metadata.model</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>0-1</release-version> - <specification-version>0.8</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.dbapi</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.2</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>3</release-version> - <specification-version>1.53</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor.bracesmatching</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>0-1</release-version> - <specification-version>1.22</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor.completion</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.12</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor.document</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.3</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor.fold</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.42</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor.lib</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>3</release-version> - <specification-version>4.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor.lib2</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>2.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.26</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.lexer</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>2</release-version> - <specification-version>1.27</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.projectapi</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.26</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.queries</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.15</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.swing.plaf</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.34</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.actions</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.2</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.awt</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.7</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.dialogs</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.2</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.explorer</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.8</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.filesystems</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>9.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.loaders</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>7.61</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.modules</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.2</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.nodes</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>7.23</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.text</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.16</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>9.3</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util.lookup</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>8.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util.ui</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>9.3</specification-version> - </run-dependency> - </dependency> - </module-dependencies> - <test-dependencies> - <test-type> - <name>unit</name> - <test-dependency> - <code-name-base>org.netbeans.libs.junit4</code-name-base> - <compile-dependency/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.csl.api</code-name-base> - <recursive/> - <compile-dependency/> - <test/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.db</code-name-base> - <compile-dependency/> - <test/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.db.metadata.model</code-name-base> - <compile-dependency/> - <test/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base> - <compile-dependency/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.editor.mimelookup.impl</code-name-base> - <compile-dependency/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.lexer</code-name-base> - <compile-dependency/> - <test/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.nbjunit</code-name-base> - <recursive/> - <compile-dependency/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.projectapi.nb</code-name-base> - </test-dependency> - <test-dependency> - <code-name-base>org.openide.util.lookup</code-name-base> - <compile-dependency/> - <test/> - </test-dependency> - </test-type> - </test-dependencies> - <friend-packages> - <friend>com.sun.tools.odb</friend> - <friend>org.netbeans.modules.php.editor</friend> - <package>org.netbeans.modules.db.sql.editor.api.completion</package> - </friend-packages> - </data> - </configuration> -</project> +<?xml version="1.0" encoding="UTF-8"?> Review comment: As part of recent check in, I believe I've resolved this issue. Please confirm when able > 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 |; > ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- 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
