diff --git a/README.md b/README.md index 44d9ec64..1782e1da 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ In the VS Code command palette : * Java - broad selection of various predefined Java classes * Unit tests - JUnit and TestNG templates for test suites and test cases * Other - various templates for Javascript, JSON, YAML, properties, ... files +* __Java: Create New Notebook...__ command to create a new [Java notebook](#interactive-java-notebooks)(`.ijnb` file) +* __Java: Open JShell...__ command to open [JShell](#jshell) . * __Java: Compile Workspace__ - invoke Maven or Gradle build * __Java: Clean Workspace__ - clean Maven or Gradle build * __Download, install and Use JDK__ - allows download and installation of JDK binaries @@ -63,6 +65,40 @@ In the VS Code command palette : Project Explorer provides an overview of logical project structure, groups sources together and greatly simplifies Java package structure exploration. Project Explorer is an addition to the classical workspace explorer. Use it to build, test, execute and operate your Maven and Gradle Java projects. ![Project Explorer](vscode/images/project-explorer.png) +## Interactive Java Notebooks +### Introduction + * Experience interactive coding with Java notebooks. + Use the __Java: Create New Notebook...__ command to create a new Java notebook(`.ijnb` file) + ![Java Notebook](vscode/images/java_notebook.gif) + * Jupyter-style notebooks let you combine Java code snippets with markdown-formatted text cells. + * Run individual code cells or execute the entire notebook. + * Save outputs alongside code cells. + * Sharing notebooks + * Share as `.ijnb` files for use with Oracle Java extension. + * Rename with `.ipynb` for viewing in other IDEs Jupyter etc. + +### Java Notebooks for Java Projects + * Document Java projects with interactive Java notebooks. + * Open/Create a Java notebook in your workspace folder loaded with classes from your project. + ![Java Notebook For Project](vscode/images/project_notebook.gif) + * Use `Project Context` options incase you want to change to a different project context . + ![Switch Project Context](vscode/images/project_context.png) + * Provide code snippets, markdown explanations, and expected outputs. + +### Notebook Configurations + * Following configuration settings are available + * `jdk.notebook.classpath` + * `jdk.notebook.modulepath` + * `jdk.notebook.addmodules` + * `jdk.notebook.enablepreview` + * `jdk.notebook.implicitimports` + * Note : These settings *override* any settings inferred from project context  + +## JShell + * Use the __Java: Open JShell...__ command to open JShell . + * Project classes from currently open project are automatically loaded. + ![JShell](vscode/images/jshell.gif) + ## Debugger and Launch Configurations Language Server __Java+ ...__ launch configuration supports debugging and running Java applications using JDK11 or newer. 1. The launch configuration (debugger) is invoked when `Run main | Debug main` codelens is selected in the code. diff --git a/vscode/images/java_notebook.gif b/vscode/images/java_notebook.gif new file mode 100644 index 00000000..2650d1a3 Binary files /dev/null and b/vscode/images/java_notebook.gif differ diff --git a/vscode/images/jshell.gif b/vscode/images/jshell.gif new file mode 100644 index 00000000..e98e2937 Binary files /dev/null and b/vscode/images/jshell.gif differ diff --git a/vscode/images/project_context.png b/vscode/images/project_context.png new file mode 100644 index 00000000..cab77851 Binary files /dev/null and b/vscode/images/project_context.png differ diff --git a/vscode/images/project_notebook.gif b/vscode/images/project_notebook.gif new file mode 100644 index 00000000..91633c43 Binary files /dev/null and b/vscode/images/project_notebook.gif differ