-
Notifications
You must be signed in to change notification settings - Fork 216
VS Code specific development instructions
Johannes Renner edited this page Aug 19, 2020
·
8 revisions
This is a description of how to setup Visual Studio Code for developing Uyuni, particularly to work on the Java code using the Java Extension Pack.
- Install the latest version of Visual Studio Code. How to do this exactly depends mostly on your operating system, but also on your personal preferences. I am currently using a flatpak from flathub but there is lots of other options available from the official download site.
- Install the Java Extension Pack from the "Extensions" view. This includes the most important extensions for Java development, especially the Java language server, but also support for the most commonly used build tools like maven.
- If you come from eclipse you might want to consider installing the Eclipse Keymap.
- Clone the repo from GitHub as described here.
- Configure the development machine as described here.
- Make sure to resolve the dependencies for your current branch from the commandline as described, all
jar
file dependencies should be in the/lib
folder before proceeding. Note that switching between branches might require you to repeat this step!
- Wait until this PR is merged (or temporarily remove
java/conf/eclipse/.project
from your clone of the repo). - Start VS Code and from the welcome screen (or the "File" menu) use "Open folder...", choose the
java
subdirectory of the Uyuni repository. - Opening any of the Java files in the editor should automatically enable the Java language server and start the compilation / project setup.
- Referenced libraries will automatically be found in the
/lib
subfolder. - If everything went well you should see 0 errors, only warnings and info messages.