From b30b3e069fcc6b2535e74d72e7c311a24ee3ee8d Mon Sep 17 00:00:00 2001 From: Dominique Kleeven <10584854+dominiquekleeven@users.noreply.github.com> Date: Wed, 9 Apr 2025 17:15:15 +0200 Subject: [PATCH 1/2] Update setting-up-an-ide.md --- docs/developer-guide/setting-up-an-ide.md | 55 +++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/docs/developer-guide/setting-up-an-ide.md b/docs/developer-guide/setting-up-an-ide.md index cceb563..115fe8a 100644 --- a/docs/developer-guide/setting-up-an-ide.md +++ b/docs/developer-guide/setting-up-an-ide.md @@ -90,20 +90,69 @@ cp ~//openremote/tools/intellij/Theme--GrepCon - Set "java.home" in settings if not auto-detected 5. Setup Gradle: - The Gradle plugin should auto-detect the project structure - - If not, run "Java: Import Java projects into workspace" from command palette + - If not, run "Java: Import Java projects into workspace" from command palette (Ctrl+Shift+P) 6. Build and Run: - Terminal: `./gradlew clean installDist` - Use Run and Debug view (Ctrl+Shift+D) to run OpenRemote Manager - Ensure Docker services are running before launching the Manager. For UI work, run `npm run serve` in `/openremote/ui/app/manager`. :::note -For custom working directory or launch settings, you may need to configure `.vscode/settings.json` and `.vscode/launch.json`. Refer to VS Code Java documentation for advanced configuration options. +For custom working directory or launch settings, you may need to configure `.vscode/settings.json` and `.vscode/launch.json`. We have provided an example of the `launch.json` file below. + +For advanced configuration options, refer to the [VS Code Java documentation](https://code.visualstudio.com/docs/languages/java). ::: + +#### Launch Settings +Below you can find an example of the `.vscode/launch.json` file that can be used to run the Manager with different setups. The configurations are based on our IntelliJ launch profiles. + +```json +{ + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Empty Setup", + "request": "launch", + "mainClass": "org.openremote.manager.Main", + "projectName": "manager", + }, + { + "type": "java", + "name": "Demo Setup", + "request": "launch", + "mainClass": "org.openremote.manager.Main", + "projectName": "manager", + "env": { + "OR_SETUP_TYPE": "demo" + } + }, + { + "type": "java", + "name": "Test Setup", + "request": "launch", + "mainClass": "org.openremote.manager.Main", + "projectName": "setup", + }, + ] +} +``` + +:::note + +Sometimes the projectName differs, e.g. `manager` vs `manager_`. It depends on how VS Code interprets the project structure. + +You can specify the module by setting the `projectName` to the name of the module you want to run. See the `Test Setup` configuration as an example. + +::: + + + + + ## Setting the working directory All Docker and Gradle commands **must be executed in the project root directory**. If you are working on the main OpenRemote repository, this means the root of the repository. If you are [Creating a custom project](creating-a-custom-project.md), this means the root of your project's repository. From f0dedfef5b482f8d887ed5c912e96df207f732f9 Mon Sep 17 00:00:00 2001 From: Dominique Kleeven <10584854+dominiquekleeven@users.noreply.github.com> Date: Wed, 9 Apr 2025 17:19:01 +0200 Subject: [PATCH 2/2] Whitespace --- docs/developer-guide/setting-up-an-ide.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/developer-guide/setting-up-an-ide.md b/docs/developer-guide/setting-up-an-ide.md index 115fe8a..794f0c5 100644 --- a/docs/developer-guide/setting-up-an-ide.md +++ b/docs/developer-guide/setting-up-an-ide.md @@ -105,7 +105,6 @@ For advanced configuration options, refer to the [VS Code Java documentation](ht ::: - #### Launch Settings Below you can find an example of the `.vscode/launch.json` file that can be used to run the Manager with different setups. The configurations are based on our IntelliJ launch profiles. @@ -149,10 +148,6 @@ You can specify the module by setting the `projectName` to the name of the modul ::: - - - - ## Setting the working directory All Docker and Gradle commands **must be executed in the project root directory**. If you are working on the main OpenRemote repository, this means the root of the repository. If you are [Creating a custom project](creating-a-custom-project.md), this means the root of your project's repository.