Below enhancements/fixes are based on JEP-325

  1. New hint to convert switch-cases to rule kind cases


    After implementing the hint fix


  2. New hint to convert mixed case kind in Switch-Expression/Switch-Cases to rule kind cases 
    All mixed kind of cases ( i.e., having both :  and  -> )   will be converted to rule(->) kind cases

    hint  for converting mixed case type in Switch to rule kind cases. 


    After implementing the error fix:


    Hint for converting mixed type in Switch expression to to rule kind cases.


    After implementing the error fix:


  3. Formatting and re-indentation of Switch-Expression and Rule Switch.
      a. switch-expression before formatting :

    switch-expression after formatting :

    b. switch-expression with rule cases before formatting:

    switch-expression with rule cases after formatting:


  4. Auto complete of enum case values in Switch-Expression



Bug-Fixes:

  1. NETBEANS-1728: ClassCastException in Switch Expression
  2. NETBEANS-1674: NPE thrown while formatting the switch expression


Steps to enable preview features in NetBeans IDE :

  1. Goto Project → Properties
  2. Goto Build → Compiling pane : Uncheck 'Run Compilation in External VM' and Add '--enable-preview' in Additional Compiler Options
  3. Goto Run pane : Add '--enable-preview' in VM Options
  • No labels