Skip to content

Commit 5475ae8

Browse files
authored
Merge pull request #26 from sourceplusplus/qualified-name
Qualified name
2 parents 545c70e + cae1680 commit 5475ae8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/commonMain/kotlin/spp.protocol/utils/ArtifactNameUtils.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ object ArtifactNameUtils {
5151
}
5252

5353
fun getShortFunctionSignature(qualifiedName: String): String {
54-
return getFunctionSignature(qualifiedName).replace("\\B\\w+(\\.)".toRegex(), "$1")
54+
return getFunctionSignature(qualifiedName.substringBefore("#"))
55+
.replace("\\B\\w+(\\.)".toRegex(), "$1")
5556
}
5657

5758
fun getFunctionSignature(qualifiedName: String): String {
58-
val withoutClassName = qualifiedName.replace(getQualifiedClassName(qualifiedName)!!, "")
59+
val withoutClassName = qualifiedName.substringBefore("#")
60+
.replace(getQualifiedClassName(qualifiedName.substringBefore("#"))!!, "")
5961
return withoutClassName.substring(
6062
withoutClassName.substring(0, withoutClassName.indexOf("(")).lastIndexOf("?") + 2
6163
)

src/jvmMain/kotlin/spp/protocol/service/live/LiveViewService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package spp.protocol.service.live
22

3-
import spp.protocol.view.LiveViewSubscription
43
import io.vertx.codegen.annotations.ProxyGen
54
import io.vertx.codegen.annotations.VertxGen
65
import io.vertx.core.AsyncResult
76
import io.vertx.core.Handler
7+
import spp.protocol.view.LiveViewSubscription
88

99
/**
1010
* todo: description.
@@ -17,5 +17,6 @@ import io.vertx.core.Handler
1717
interface LiveViewService {
1818
fun addLiveViewSubscription(subscription: LiveViewSubscription, handler: Handler<AsyncResult<LiveViewSubscription>>)
1919
fun removeLiveViewSubscription(subscriptionId: String, handler: Handler<AsyncResult<LiveViewSubscription>>)
20+
fun getLiveViewSubscriptions(handler: Handler<AsyncResult<List<LiveViewSubscription>>>)
2021
fun clearLiveViewSubscriptions(handler: Handler<AsyncResult<List<LiveViewSubscription>>>)
2122
}

0 commit comments

Comments
 (0)