...
- New JDK 14 Language Features
- JEP 359: Records (Preview), syntax coloring, Navigator support, and formatting of the new Java Records.
public class Foo {
public record Bar(String x, int y) {
}
}
Impacted NetCAT test spec: Java Editor, cloned to 12.0: https://netbeans-vm.apache.org/synergy/client/app/#/specification/448
Task to be added to test spec: Run 12.0 on JDK 14, make sure to uninstall nb-javac if installed, create a Maven application and enable preview features (explain how), and create a class like the above, copy/pasted from the test spec. The syntax coloring should be not broken and the Navigator should show equals, hashCode, toString, x, y, etc.
Status: Done. Added as test case 1 in the new section 21, "Java Language Preview Features", of the above Java Editor test spec.
- JEP 359: Records (Preview), syntax coloring, Navigator support, and formatting of the new Java Records.
- New JDK 13 Language Features
- JEP 354: Switch Expressions (Preview Feature), as shown below.
Impacted NetCAT test spec: Java Editor, cloned to 12.0: https://netbeans-vm.apache.org/synergy/client/app/#/specification/448
Task to be added to test spec: Run 12.0 on JDK 13 or later, make sure to uninstall nb-javac if installed, create a Maven application and enable preview features (explain how), verify that the syntax colouring for switch expressions is correct by creating the code above, copy/paste from the test spec, and then seeing that the colors are like the above, not broken, no error markings.
Status: Done. Added as test case 2 in the new section 21, "Java Language Preview Features", of the above Java Editor test spec. - JEP 355: Text Blocks (Preview Feature), hint for converting to/from text blocks.
Impacted NetCAT test spec: Java Hints, cloned to 12.0: https://netbeans-vm.apache.org/synergy/client/app/#/specification/449
Task to be added to test spec: Run 12.0 on JDK 13 or later, make sure to uninstall nb-javac if installed, create a Maven application and enable preview features (explain how), and use code like the above, copy/pasted from test spec, to verify the hint works to/from text blocks.
Status: Done. Added as test case 1 in the new section 5, "Java Language Preview Features", of the above Java Hint test spec.
Impacted NetCAT test spec: Editor Options
Task to be added to test spec: Run 12.0 on JDK 13 or later, make sure to uninstall nb-javac if installed, create a Maven application and enable preview features (explain how), create code like the above, go to the Options window, go to Fonts & Colors, choose Syntax, "Java" in Language drop-down, "Text Block" in Category list, then change the Background to something different and then check that the new color is applied in the editor for text blocks.
Status: to be done
- JEP 354: Switch Expressions (Preview Feature), as shown below.
- New JDK 12 Language Features
- JEP 325: Switch Expressions (Preview) – code completion for JEP-325 preview feature for multiple case labels, as shown below.
Impacted NetCAT test spec: Java Code Completion
Task to be added to test spec: Run 12.0 on JDK 13 or later, make sure to uninstall nb-javac if installed, create a Maven application and enable preview features (explain how), and use code like the above, copy/pasted from test spec, to verify the code completion works as above.
Status: to be done
Hint for converting to JEP-325 preview feature for switch expressions:
Impacted NetCAT test spec: Java Hints, cloned to 12.0: https://netbeans-vm.apache.org/synergy/client/app/#/specification/449
Task to be added to test spec: Run 12.0 on JDK 12 or later, make sure to uninstall nb-javac if installed, create a Maven application and enable preview features (explain how), and use code like the above, copy/pasted from test spec, to verify the hint works to/ from switch expressions to rule switch.
Status: to be done Done. Added as test case 2 in the new section 5, "Java Language Preview Features", of the above Java Hint test spec.
- JEP 325: Switch Expressions (Preview) – code completion for JEP-325 preview feature for multiple case labels, as shown below.
- New JDK 11 Language Features
- JEP 330: Launch Single-File Source-Code Programs – a new Java source file can be created in the Favorites window, it can be run, and debugged.
Impacted NetCAT test spec: Java Editor
Task to be added to test spec: Run 12.0 on JDK 11 or above, open the Favorites window, create a new Java source file, add some code, run it, and debug it.
Status: to be done
- JEP 330: Launch Single-File Source-Code Programs – a new Java source file can be created in the Favorites window, it can be run, and debugged.
...