Skip to content

Commit 43358b5

Browse files
committed
Use utility classes from shared KLS module
1 parent a7c83b9 commit 43358b5

17 files changed

+23
-299
lines changed

adapter/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j.debug:0.6.0'
2727
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
2828
implementation 'org.jetbrains.kotlin:kotlin-reflect'
29-
implementation 'com.github.fwcd.kotlin-language-server:shared:7eb014a37a9a9184edd974c4f3d7be05b1cf9485'
29+
implementation 'com.github.fwcd.kotlin-language-server:shared:2db25b8de902eecfbc072f7a8529877cd05aa780'
3030
// The Java Debug Interface classes (com.sun.jdi.*)
3131
implementation files("${System.properties['java.home']}/../lib/tools.jar")
3232
testImplementation 'junit:junit:4.12'

adapter/src/main/kotlin/org/javacs/ktda/KDAMain.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package org.javacs.ktda
22

33
import java.util.concurrent.Executors
4+
import org.javacs.kt.LOG
5+
import org.javacs.kt.util.ExitingInputStream
46
import org.javacs.ktda.adapter.KotlinDebugAdapter
57
import org.javacs.ktda.core.launch.DebugLauncher
68
import org.javacs.ktda.jdi.launch.JDILauncher
7-
import org.javacs.ktda.util.ExitingInputStream
89
import org.javacs.ktda.util.LoggingInputStream
910
import org.javacs.ktda.util.LoggingOutputStream
1011
import org.eclipse.lsp4j.debug.launch.DSPLauncher
@@ -23,14 +24,10 @@ fun main(args: Array<String>) {
2324
LOG.connectJULFrontend()
2425

2526
val launcher: DebugLauncher = JDILauncher()
26-
var client: IDebugProtocolClient? = null
2727

2828
// Setup IO streams for JSON communication
2929

30-
val input = LoggingInputStream(ExitingInputStream(System.`in`) {
31-
client?.terminated(TerminatedEventArguments())
32-
System.exit(0)
33-
}, JSON_IN_LOGGING, JSON_IN_LOGGING_BUFFER_LINES)
30+
val input = LoggingInputStream(ExitingInputStream(System.`in`), JSON_IN_LOGGING, JSON_IN_LOGGING_BUFFER_LINES)
3431
val output = LoggingOutputStream(System.out, JSON_OUT_LOGGING, JSON_OUT_LOGGING_BUFFER_LINES)
3532

3633
// Create debug adapter and launcher

adapter/src/main/kotlin/org/javacs/ktda/Logger.kt

Lines changed: 0 additions & 163 deletions
This file was deleted.

adapter/src/main/kotlin/org/javacs/ktda/adapter/KotlinDebugAdapter.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import org.eclipse.lsp4j.debug.*
1111
import org.eclipse.lsp4j.jsonrpc.services.JsonRequest
1212
import org.eclipse.lsp4j.debug.services.IDebugProtocolServer
1313
import org.eclipse.lsp4j.debug.services.IDebugProtocolClient
14-
import org.javacs.ktda.LOG
15-
import org.javacs.ktda.JSON_LOG
16-
import org.javacs.ktda.LogLevel
17-
import org.javacs.ktda.LogMessage
14+
import org.javacs.kt.LOG
15+
import org.javacs.kt.LogLevel
16+
import org.javacs.kt.LogMessage
17+
import org.javacs.kt.util.AsyncExecutor
18+
import org.javacs.ktda.util.JSON_LOG
1819
import org.javacs.ktda.util.KotlinDAException
19-
import org.javacs.ktda.util.AsyncExecutor
2020
import org.javacs.ktda.util.waitUntil
2121
import org.javacs.ktda.core.Debuggee
2222
import org.javacs.ktda.core.DebugContext

adapter/src/main/kotlin/org/javacs/ktda/classpath/FindClassPath.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package org.javacs.ktda.classpath
22

33
import java.util.logging.Level
44
import org.javacs.kt.SourceExclusions
5-
import org.javacs.ktda.LOG
5+
import org.javacs.kt.LOG
66
import org.javacs.ktda.util.winCompatiblePathOf
77
import org.javacs.ktda.util.tryResolving
88
import org.javacs.ktda.util.firstNonNull

adapter/src/main/kotlin/org/javacs/ktda/classpath/GradleDependencyResolver.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.javacs.ktda.classpath
22

3-
import org.javacs.ktda.LOG
3+
import org.javacs.kt.LOG
44
import org.javacs.ktda.util.firstNonNull
55
import org.javacs.ktda.util.tryResolving
66
import org.javacs.ktda.util.execAndReadStdout

adapter/src/main/kotlin/org/javacs/ktda/classpath/PathUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.javacs.ktda.classpath
22

3-
import org.javacs.ktda.LOG
3+
import org.javacs.kt.LOG
44
import org.javacs.ktda.util.firstNonNull
55
import java.nio.file.Files
66
import java.nio.file.Paths

adapter/src/main/kotlin/org/javacs/ktda/jdi/JDIDebuggee.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import org.javacs.ktda.core.launch.LaunchConfiguration
99
import org.javacs.ktda.core.event.DebuggeeEventBus
1010
import org.javacs.ktda.core.breakpoint.Breakpoint
1111
import org.javacs.ktda.core.breakpoint.ExceptionBreakpoint
12-
import org.javacs.ktda.LOG
12+
import org.javacs.kt.LOG
1313
import org.javacs.ktda.util.ObservableList
1414
import org.javacs.ktda.classpath.findValidKtFilePath
1515
import org.javacs.ktda.classpath.toJVMClassNames

adapter/src/main/kotlin/org/javacs/ktda/jdi/event/VMEventBus.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.javacs.ktda.jdi.event
22

3-
import org.javacs.ktda.LOG
3+
import org.javacs.kt.LOG
44
import org.javacs.ktda.util.ListenerList
55
import org.javacs.ktda.util.Subscription
66
import org.javacs.ktda.core.event.DebuggeeEventBus

adapter/src/main/kotlin/org/javacs/ktda/jdi/launch/JDILauncher.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.javacs.ktda.jdi.launch
22

3-
import org.javacs.ktda.LOG
3+
import org.javacs.kt.LOG
44
import org.javacs.ktda.core.launch.DebugLauncher
55
import org.javacs.ktda.core.launch.LaunchConfiguration
66
import org.javacs.ktda.core.launch.AttachConfiguration

0 commit comments

Comments
 (0)