|
| 1 | +# Contributing |
| 2 | + |
| 3 | +## Running the Extension |
| 4 | + |
| 5 | +With Visual Studio Code: |
| 6 | + |
| 7 | +- Clone this repository locally. |
| 8 | +- Run `npm install` in the cloned `codewind-java-profiler` folder. This installs all necessary npm modules in the client directory. |
| 9 | +- Open the clone of this repository in Visual Studio Code. |
| 10 | +- Press Ctrl+Shift+B (Cmd+Shift+B on Mac) to compile the client. |
| 11 | +- Switch to the Debug viewlet. |
| 12 | +- Select `Launch Client` from the drop down and press the Run icon. |
| 13 | + |
| 14 | +## Testing |
| 15 | + |
| 16 | +### Integration Tests |
| 17 | + |
| 18 | +To be added |
| 19 | + |
| 20 | +### Server Tests |
| 21 | + |
| 22 | +Unit tests for the Java Server are in the `server/src/test` directory. These are JUnit unit tests, but can only be run inside the server Docker container. |
| 23 | + |
| 24 | +To run the container complete the following steps: |
| 25 | + |
| 26 | +- Run `docker build -t java-ls .` in the `server` directory. |
| 27 | +- Run `docker run -it java-ls bash`. |
| 28 | +- In the `/profiling` directory, run `mvn test`. |
| 29 | +- You will see a summary of all tests run. |
| 30 | + |
| 31 | +## Building/Installing the Extension |
| 32 | + |
| 33 | +To build a `.vsix` extension package that can then be installed/published: |
| 34 | + |
| 35 | +- Run `npm install` in the `codewind-java-profiler` folder. |
| 36 | +- Install the `vsce` package globally with `npm install -g vsce`. |
| 37 | +- Run `vsce package` in the `codewind-java-profiler` folder. |
| 38 | +- A `.vsix` file will then be generated. |
| 39 | + |
| 40 | +To install the extension: |
| 41 | + |
| 42 | +- Run `code --install-extension <name of generated vsix file>` in the `codewind-java-profiler` folder. |
| 43 | +- Restart Visual Studio Code. |
| 44 | +- The extension should appear in your list of installed extensions. |
| 45 | + |
| 46 | +For more information refer to: <https://code.visualstudio.com/api/working-with-extensions/publishing-extension> |
0 commit comments