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: [email protected]

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

Reply via email to