You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "dbalek (via GitHub)" <gi...@apache.org> on 2024/10/11 11:12:02 UTC

[PR] LSP: Provide code completion for named resources even when generic NBLS Java support is disabled [netbeans]

dbalek opened a new pull request, #7869:
URL: https://github.com/apache/netbeans/pull/7869

   Code completion for a specific annotation values (like a named DataSources and buckets, etc.) should work even if the generic Java support is disabled in NBLS (as it is provided by another VSCode extension).


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] LSP: Provide code completion for named resources even when generic NBLS Java support is disabled [netbeans]

Posted by "dbalek (via GitHub)" <gi...@apache.org>.
dbalek merged PR #7869:
URL: https://github.com/apache/netbeans/pull/7869


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] LSP: Provide code completion for named resources even when generic NBLS Java support is disabled [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on code in PR #7869:
URL: https://github.com/apache/netbeans/pull/7869#discussion_r1798948156


##########
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/assets/CloudAssetsJavaCompletion.java:
##########
@@ -106,8 +107,12 @@ private Class<? extends OCIItem> element2ReferenceClass(Element element) {
             Elements elements = this.processingEnv.get().getElementUtils();
             Types types = this.processingEnv.get().getTypeUtils();
             tm = types.erasure(tm);
-            TypeElement dataSource = elements.getTypeElement(DATA_SOURCE);
-            if (dataSource != null && types.isAssignable(tm, dataSource.asType())) {
+            TypeElement javaDataSource = elements.getTypeElement(JAVA_DATA_SOURCE);

Review Comment:
   Please double check this `java.sql.DataSource` type is valid -- I haven't found it in JDK17-21 javadocs. There's just `javax.sql.DataSource` (although in `java.sql` module) ...
   



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] LSP: Provide code completion for named resources even when generic NBLS Java support is disabled [netbeans]

Posted by "dbalek (via GitHub)" <gi...@apache.org>.
dbalek commented on code in PR #7869:
URL: https://github.com/apache/netbeans/pull/7869#discussion_r1800696056


##########
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/assets/CloudAssetsJavaCompletion.java:
##########
@@ -106,8 +107,12 @@ private Class<? extends OCIItem> element2ReferenceClass(Element element) {
             Elements elements = this.processingEnv.get().getElementUtils();
             Types types = this.processingEnv.get().getTypeUtils();
             tm = types.erasure(tm);
-            TypeElement dataSource = elements.getTypeElement(DATA_SOURCE);
-            if (dataSource != null && types.isAssignable(tm, dataSource.asType())) {
+            TypeElement javaDataSource = elements.getTypeElement(JAVA_DATA_SOURCE);

Review Comment:
   Fixed. Good catch.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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