From 57484cd65d511ea915f7d8e7b54e8a045ad57802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Mon, 10 Sep 2018 13:54:26 +0200 Subject: [PATCH] Add heap options env variable to jdt.ls start script (#11116) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- .../installers/1.0.1/org.eclipse.che.ls.java.script.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh b/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh index 3fe2687b1d..723aeea651 100644 --- a/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh +++ b/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh @@ -34,6 +34,10 @@ LS_DIR=${CHE_DIR}/ls-java LS_LAUNCHER=${LS_DIR}/launch.sh LS_DATA_DIR=$HOME/jdtls/data +if [ ! "$CHE_WORKSPACE_JDT_LS_HEAP_OPTIONS" ]; then + CHE_WORKSPACE_JDT_LS_HEAP_OPTIONS="-Xmx1024M" +fi + if [ -f /etc/centos-release ]; then FILE="/etc/centos-release" LINUX_TYPE=$(cat $FILE | awk '{print $1}') @@ -140,4 +144,4 @@ echo writing start script to ${LS_LAUNCHER} touch ${LS_LAUNCHER} chmod +x ${LS_LAUNCHER} EQUINOX_LAUNCHER=$(ls ${LS_DIR}/plugins/org.eclipse.equinox.launcher_*.jar) -echo "java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -noverify -Xmx1G -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4410 -jar ${EQUINOX_LAUNCHER} -configuration ./config_linux -data ${LS_DATA_DIR}" > ${LS_LAUNCHER} +echo "java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -noverify ${CHE_WORKSPACE_JDT_LS_HEAP_OPTIONS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4410 -jar ${EQUINOX_LAUNCHER} -configuration ./config_linux -data ${LS_DATA_DIR}" > ${LS_LAUNCHER}