Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Below enhancements/fixes are based on JEP-325

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

    Image Added
    After implementing the hint fix
    Image Added

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

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

    After implementing the error fix:
    Image Added

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

    After implementing the error fix:
    Image Added

  3. Formatting and re-Formatting and correct re indentation of Switch-Expression and Rule Switch.
      a. switch-expression before formatting :
    Image Added
    switch-expression after formatting :
    Image Added
    b. switch-expression with rule cases before formatting:
    Image Added
    switch-expression with rule cases after formatting:
    Image Added

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


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