You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "nmatt (via GitHub)" <gi...@apache.org> on 2026/02/09 21:30:54 UTC

[I] No code completion for constructor invocation of local classes [netbeans]

nmatt opened a new issue, #9199:
URL: https://github.com/apache/netbeans/issues/9199

   ### Apache NetBeans version
   
   Apache NetBeans 28
   
   ### What happened
   
   For local classes, code completion for the class name works, but for constructor invocations (`new` expressions) no code completion is offered.
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   Example:
   ```java
   class Example
   {
       static class NonLocalClass { int a; int b; NonLocalClass(int a, int b) { } }
       record NonLocalRecord(int a, int b) { }
   
       void method()
       {
           class LocalClass { int a; int b; LocalClass(int a, int b) { } }
           record LocalRecord(int a, int b) { }
           
           new LocalClass   // <– code completion here
       }
   }
   ```
   => No argument-list code completion for the local classes is offered, in contrast to constructor invocations of nonlocal classes.
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows
   
   ### JDK
   
   17
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
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.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: [I] No code completion for constructor invocation of local classes [netbeans]

Posted by "nmatt (via GitHub)" <gi...@apache.org>.
nmatt commented on issue #9199:
URL: https://github.com/apache/netbeans/issues/9199#issuecomment-3894804480

   @mbien It's likely to be the same underlying cause, but the description is a bit different. This issue here is about the first Ctrl+Space when the full typename is already present. For `NonLocalClass`, you get the constructor argument completion on the first Ctrl+Space. For `LocalClass` you don't get constructor argument completion, unless you first type an opening parenthesis.


-- 
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: [I] No code completion for constructor invocation of local classes [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #9199:
URL: https://github.com/apache/netbeans/issues/9199#issuecomment-3892695100

   sounds like https://github.com/apache/netbeans/issues/8436


-- 
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: [I] No code completion for constructor invocation of local classes [netbeans]

Posted by "lahodaj (via GitHub)" <gi...@apache.org>.
lahodaj closed issue #9199: No code completion for constructor invocation of local classes
URL: https://github.com/apache/netbeans/issues/9199


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