diff --git a/doc/ide.html b/doc/ide.html index 1730eb0bef5..288a477e538 100644 --- a/doc/ide.html +++ b/doc/ide.html @@ -41,14 +41,20 @@
make vscode-project-clangd

Additional instructions for configuring the given indexer will be displayed after the workspace has been generated.

Visual Studio

-

This section is a work in progress.

-
make ide-project
+

The make system can generate a Visual Studio project for the Hotspot native source. After configuring, the project is generated using:

+
make hotspot-ide-project
+

This creates a file named jvm.vcxproj in ide\hotspot-visualstudio subfolder of the build output folder. The file can be opened in Visual Studio via File -> Open -> Project/Solution.

Compilation Database

The make system can generate generic native code indexing support in the form of a Compilation Database that can be used by many different IDEs and source code indexers.

make compile-commands

It's also possible to generate the Compilation Database for the HotSpot source code only, which is a bit faster as it includes less information.

make compile-commands-hotspot

IDE support for Java code

-

This section is a work in progress.

+

IntelliJ IDEA

+

The JDK project has a script that can be used for indexing the project with IntelliJ. After configuring and building the JDK, an IntelliJ workspace can be generated by running the following command in the top-level folder of the cloned repository:

+
bash bin/idea.sh
+

To use it, choose File -> Open... in IntelliJ and select the folder where you ran the above script.

+

Next, configure the project SDK in IntelliJ. Open File -> Project Structure -> Project and select build/<config>/images/jdk as the SDK to use.

+

In order to run the tests from the IDE, you can use the JTReg plugin. Instructions for building and using the plugin can be found here.

diff --git a/doc/ide.md b/doc/ide.md index 4a692efd22f..f0a419c948b 100644 --- a/doc/ide.md +++ b/doc/ide.md @@ -45,12 +45,17 @@ after the workspace has been generated. #### Visual Studio -This section is a work in progress. +The make system can generate a Visual Studio project for the Hotspot +native source. After configuring, the project is generated using: ```shell -make ide-project +make hotspot-ide-project ``` +This creates a file named `jvm.vcxproj` in `ide\hotspot-visualstudio` +subfolder of the build output folder. The file can be opened in Visual Studio +via `File -> Open -> Project/Solution`. + #### Compilation Database The make system can generate generic native code indexing support in the form of @@ -70,4 +75,24 @@ make compile-commands-hotspot ### IDE support for Java code -This section is a work in progress. \ No newline at end of file +#### IntelliJ IDEA + +The JDK project has a script that can be used for indexing the project +with IntelliJ. After configuring and building the JDK, an IntelliJ workspace +can be generated by running the following command in the top-level folder +of the cloned repository: + +```shell +bash bin/idea.sh +``` + +To use it, choose `File -> Open...` in IntelliJ and select the folder where +you ran the above script. + +Next, configure the project SDK in IntelliJ. Open +`File -> Project Structure -> Project` and select `build//images/jdk` +as the SDK to use. + +In order to run the tests from the IDE, you can use the JTReg plugin. +Instructions for building and using the plugin can be found +[here](https://github.com/openjdk/jtreg/tree/master/plugins/idea).