Split jdt ls extension into two parts

One pugin to contain the bulk of the code, which is independent of jdt.ls, lsp4e and lsp4j.
Second plugin to contain the jdt.ls specific DelegateCommandHandler implementation.

This should allow us to somehow re-use the bulk of the code in STS4 eclipse, i.e. when
we have access to JDT from eclipse directly, and there is no jdt.ls process around.
This commit is contained in:
Kris De Volder
2018-04-16 14:24:42 -07:00
parent 704fdaa21d
commit 6f2b8be802
30 changed files with 206 additions and 153 deletions

View File

@@ -4,9 +4,9 @@ set -e -x
workdir=$(pwd)
# Build jdt.ls
cd ${HOME}/git/eclipse.jdt.ls
jdt_ls_repo=$(pwd)
./mvnw -Pserver-distro -Pupdate-site clean package
# cd ${HOME}/git/eclipse.jdt.ls
# jdt_ls_repo=$(pwd)
# ./mvnw -Pserver-distro -Pupdate-site clean package
# Section below disabled for now. So we can work on the 'fallbacks' with missing or old vscode-java
# Build vscode-java
@@ -21,10 +21,12 @@ jdt_ls_repo=$(pwd)
#code --uninstall-extension redhat.java || echo "Not installed redhat.java"
#code --install-extension *.vsix
code --install-extension redhat.java
# Build spring boot ls
cd $workdir
npm install
rm -fr *.vsix
npm run vsce-package
code --uninstall-extension Pivotal.vscode-spring-boot || echo "Not installed Pivotal.vscode-spring-boot"
rm -fr ${home}/.vscode/extensions/Pivotal.vscode-spring-boot-*
code --install-extension *.vsix

View File

@@ -32,6 +32,7 @@
],
"contributes": {
"javaExtensions": [
"./jars/jdt-ls-commons.jar",
"./jars/jdt-ls-extension.jar"
],
"languages": [
@@ -93,7 +94,7 @@
"vsce-package": "vsce package"
},
"dependencies": {
"@pivotal-tools/commons-vscode": "^0.2.0",
"@pivotal-tools/commons-vscode": "file:../commons-vscode/pivotal-tools-commons-vscode-0.2.1.tgz",
"vscode-languageclient": "^4.0.0"
},
"devDependencies": {

View File

@@ -16,10 +16,10 @@ rm -fr ${workdir}/jars
mkdir -p ${workdir}/jars
# Use maven to build jdt ls extension
cd ../../headless-services/org.springframework.tooling.jdt.ls.extension
../mvnw \
clean package
cp target/*.jar ${workdir}/jars/jdt-ls-extension.jar
cd ../../headless-services/jdt-ls-extension
../mvnw clean package
cp org.springframework.tooling.jdt.ls.extension/target/*.jar ${workdir}/jars/jdt-ls-extension.jar
cp org.springframework.tooling.jdt.ls.commons/target/*.jar ${workdir}/jars/jdt-ls-commons.jar
# Use maven to build fat jar of the language server
cd ../../headless-services/spring-boot-language-server