java: make jwdp optional

This commit is contained in:
Adrian Kuschelyagi Malacoda 2020-11-11 22:08:20 -06:00
parent 4639a79c00
commit 91236b728b

View File

@ -82,8 +82,11 @@ class Java(LspServer):
else: else:
data_directory = os.path.join(get_data_home(), "java", "data") data_directory = os.path.join(get_data_home(), "java", "data")
if "--enable-debugger" in arguments:
arguments.remove("--enable-debugger")
command.append("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044")
command = command + [ command = command + [
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044",
"-Declipse.application=org.eclipse.jdt.ls.core.id1", "-Declipse.application=org.eclipse.jdt.ls.core.id1",
"-Dosgi.bundles.defaultStartLevel=4", "-Dosgi.bundles.defaultStartLevel=4",
"-Declipse.product=org.eclipse.jdt.ls.core.product", "-Declipse.product=org.eclipse.jdt.ls.core.product",