You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -11,54 +11,156 @@ vscode-java is a Visual Studio Code extension that uses a language server for it
11
11
smartness. Usually vscode-java features depend on the [Eclipse ™ JDT Language Server](https://github.com/eclipse/eclipse.jdt.ls),
12
12
(a.k.a. eclipse.jdt.ls) and the contributions should be coordinated between the two repositories.
13
13
14
-
## First Time Setup
15
-
1. Install prerequisites:
14
+
#
15
+
16
+
## Background Info
17
+
18
+
For the whole language server to get up and running it requires
19
+
two parts.
20
+
21
+
**A)** The Client Side (this repo): [VSCode Java](https://github.com/redhat-developer/vscode-java)
22
+
23
+
**B)** The Server Side: [JDT LS](https://github.com/eclipse/eclipse.jdt.ls)
24
+
25
+
#
26
+
27
+
## Complete Setup Guide
28
+
29
+
The following will be a start to finish guide to get the entire language server up and running.
30
+
31
+
#
32
+
33
+
## **A)** Client Side Setup
34
+
35
+
1. Install the required software:
16
36
* latest [Visual Studio Code](https://code.visualstudio.com/)
17
37
*[Node.js](https://nodejs.org/) v4.0.0 or higher
18
-
2. Fork and clone the repository
38
+
2. Fork and clone [this repository](https://github.com/redhat-developer/vscode-java)
39
+
40
+
Keep in mind the final directories will look like:
41
+
42
+
```
43
+
PROJECT_FOLDER/
44
+
|
45
+
|--- vscode-java/
46
+
|--- eclipse.jdt.ls/
47
+
48
+
```
49
+
50
+
19
51
3.`cd vscode-java`
20
52
4. Install the dependencies:
21
53
22
54
```bash
23
55
$ npm install
24
56
```
25
-
5. Open the folder in VS Code
26
57
27
-
## Building Eclipse ™ JDT Language Server
58
+
#
59
+
60
+
## **B)** Server Side Setup
28
61
This assumes that you are starting on the `vscode-java` directory
29
62
30
63
1.`cd ..`
31
64
2. Fork and clone the [eclipse.jdt.ls](https://github.com/eclipse/eclipse.jdt.ls) repository
65
+
66
+
Ensure the directory looks like:
67
+
```
68
+
PROJECT_FOLDER/
69
+
|
70
+
|--- vscode-java/
71
+
|--- eclipse.jdt.ls/
72
+
73
+
```
32
74
3. Build server
33
75
34
76
```bash
35
-
$ cd ..\vscode-java
77
+
$ cd ./vscode-java
36
78
$ npm run build-server
37
79
```
80
+
81
+
**\*Optional:**
38
82
You can run faster server builds during development by calling `./node_modules/.bin/gulp dev_server` script instead, this will build server binaries that are required by your host OS only. You can also use `npm run watch-server` which will build and place them on the extension for Java changes. These commands run Maven in offline mode, so you might need to run `build-server` at least once, to fetch all the dependencies.
39
83
40
84
This will build and place the binaries under the `server` folder. Alternately you can download and use the latest snapshot build from [Eclipse ™ JDT Language Server](https://github.com/eclipse/eclipse.jdt.ls) project with the following
While developing the language server and the extension, you don't need to deploy the server every time to try out changes. Instead you can run the language server out of its Eclipse workspace:
50
130
51
-
### _Launch Extension - Remote Server_
52
-
53
-
- Open VSCode on the `vscode-java` folder
54
-
- In the debug viewlet, run the launch _Launch Extension - Remote Server_
55
-
- The extension will open a socket on port 3333 and will wait for the JDT language server to connect
56
-
- In Eclipse, run the JDT language server as an Eclipse application.
57
-
- Create a debug configuration of type _Eclipse Application_.
58
-
- in the main tab of the debug configuration set the product to `org.eclipse.jdt.ls.core.product`.
59
-
- in the Environment tab, define a variable `CLIENT_PORT` with value `3333`.
60
-
- if your workspace contains 'org.eclipse.jdt.ui', use the Plug-Ins tab in the debug configuration to exclude the plug-in. The presence of 'org.eclipse.jdt.ui' will cause the language server to hang.
61
-
- You can also use the `jdt.ls.remote.server` launch configuration.
131
+
### a) _Launch Extension - Client Side_
132
+
133
+
1. Open VSCode on the `vscode-java` folder
134
+
135
+
2. In the debug viewlet, run the launch _Launch Extension - Remote Server_
3) in the Environment tab, define a variable `CLIENT_PORT` with value `3333`.
155
+
156
+

157
+
4) If your workspace contains 'org.eclipse.jdt.ui', use the Plug-Ins tab in the debug configuration to exclude the plug-in. The presence of 'org.eclipse.jdt.ui' will cause the language server to hang.
158
+
159
+
### c) _Launch Debug Server - Server Side_
160
+
161
+
- With the client side **(vscode-java) running**, you can start the remote server.
0 commit comments