You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/08/16 08:58:24 UTC
[GitHub] [netbeans] icojb25 opened a new issue, #4511: Code completion not working in default switch case (Spring Boot application)
icojb25 opened a new issue, #4511:
URL: https://github.com/apache/netbeans/issues/4511
### Apache NetBeans version
Apache NetBeans 14
### What happened
Firstly, I'm not sure if this is specific to Spring Boot projects.
I have a simple Spring RestController which passes method arguments through a switch statement. If I try to access a public static inner class field as a method or return parameter in the 'named' cases, this works, but neither the goto nor autocomplete functionality works when trying to access the inner class fields in the 'default' case of the switch statement.
Ctrl click to go to source origin (the class def) also does not work in the default case, although this works for the other switch cases.
### How to reproduce
1) Start new Spring boot project with starter-web enabled
2) build out a new RestController with a switch statment in the body
3) Attempt to access a public inner static class variable in the statement block of the 'default' switch case block, it will not work.
NB Update - this is not specific to Spring Boot, it appears to happen in standard projects as well.
`
public String method1(String variable)
{
switch (variable)
{
case Mavenproject1.RspCodes.ONE:
{
return Mavenproject1.RspCodes.ONE;
}
case Mavenproject1.RspCodes.TWO:
{
return Mavenproject1.RspCodes.TWO; <------- code completion WORKS here
}
default:
{
return Mavenproject1. <---- code completion appears to BREAK here
}
}
}
`
### Did this work correctly in an earlier version?
Apache NetBeans 13
### Operating System
Win 10 Home
### JDK
Oracle JDK 1.201
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
Building with built in Maven
Oracle 1.8 (201) JDK x64
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
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
[GitHub] [netbeans] icojb25 commented on issue #4511: Code completion not working in default switch case (Spring Boot application)
Posted by GitBox <gi...@apache.org>.
icojb25 commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1216343415
Clearing the cache does not seem to fix the problem
--
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
[GitHub] [netbeans] mbien closed issue #4511: Code completion not working in default switch case
Posted by GitBox <gi...@apache.org>.
mbien closed issue #4511: Code completion not working in default switch case
URL: https://github.com/apache/netbeans/issues/4511
--
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
[GitHub] [netbeans] icojb25 commented on issue #4511: Code completion not working in default switch case (Spring Boot application)
Posted by GitBox <gi...@apache.org>.
icojb25 commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1216400154
Hmmm, ok, thanks @neilcsmith-net is there any other info that would be helpful (where would I find it?)? I have reproduced on x2 projects (prod - Spring app, and test project above).
See from the screenshot the static inner class is not suggested.

--
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
[GitHub] [netbeans] neilcsmith-net commented on issue #4511: Code completion not working in default switch case (Spring Boot application)
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1216351084
Please try running the IDE on JDK 11 or higher and verify the problem still occurs. JDK 8 is no longer a supported option for running the IDE on. You can still choose JDK 8 under Java Platforms for projects.
You said this can be reproduced with a "standard" Maven project. Please provide a minimal reproduce project and upload a zip here - thanks!
--
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
[GitHub] [netbeans] mbien commented on issue #4511: Code completion not working in default switch case
Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1218285799
I see. Well, don't forget to upgrade to NB15 in a few weeks ;)
--
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
[GitHub] [netbeans] mbien commented on issue #4511: Code completion not working in default switch case
Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1216735355
can you update your snippet so that it is a self contained reproducer? There is no static inner class anywhere.
--
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
[GitHub] [netbeans] icojb25 commented on issue #4511: Code completion not working in default switch case
Posted by GitBox <gi...@apache.org>.
icojb25 commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1217512943
Sorry, I realise I was actually running NB13, not 14 as previously stated. This doesnt happen on NB14 so I guess we could close this, even though I expect it could be confirmed on 13 using the test case above. Apologies for the red herring.
--
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
[GitHub] [netbeans] icojb25 commented on issue #4511: Code completion not working in default switch case (Spring Boot application)
Posted by GitBox <gi...@apache.org>.
icojb25 commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1216372494
Hi @neilcsmith-net - thanks for your response. I've uploaded something below.
Re: the JDK - yes, I fixed the bug report - the project is running on JDK 8, but the IDE is running on AdoptOpenJDK 11. I have amended the report above.
[mavenproject1.zip](https://github.com/apache/netbeans/files/9349383/mavenproject1.zip)
--
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
[GitHub] [netbeans] neilcsmith-net commented on issue #4511: Code completion not working in default switch case (Spring Boot application)
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4511:
URL: https://github.com/apache/netbeans/issues/4511#issuecomment-1216390713
Thanks. Unfortunately, I cannot reproduce with that project - all works fine here.
--
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