Skip to content

Commit c36d9cb

Browse files
committed
CMP-6806 fix warnings and deprecations
(cherry picked from commit e1caead)
1 parent 0d971b1 commit c36d9cb

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

Diff for: gradle-plugins/preview-rpc/src/main/kotlin/org/jetbrains/compose/desktop/ui/tooling/preview/rpc/PreviewManager.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class PreviewManagerImpl(
290290
}
291291
}
292292
}.also {
293-
it.uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { thread, e ->
293+
it.uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { _, e ->
294294
onError(e)
295295
}
296296
threads.add(it)

Diff for: gradle-plugins/preview-rpc/src/main/kotlin/org/jetbrains/compose/desktop/ui/tooling/preview/rpc/RemotePreviewHost.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ internal class PreviewHost(private val log: PreviewLogger, connection: RemoteCon
101101
}.setUpUnhandledExceptionHandler(ExitCodes.RECEIVER_FATAL_ERROR)
102102

103103
private fun Thread.setUpUnhandledExceptionHandler(exitCode: Int): Thread = apply {
104-
uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { t, e ->
104+
uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { _, e ->
105105
try {
106106
System.err.println()
107107
System.err.println(PREVIEW_START_OF_STACKTRACE_MARKER)
@@ -151,7 +151,7 @@ internal class PreviewHost(private val log: PreviewLogger, connection: RemoteCon
151151
val possibleCandidates = previewFacade.methods.filter { it.name == "render" }
152152
throw RuntimeException("Could not find method '$signature'. Possible candidates: \n${possibleCandidates.joinToString("\n") { "* ${it}" }}", e)
153153
}
154-
val (id, fqName, frameConfig) = request
154+
val (_, fqName, frameConfig) = request
155155
val scaledWidth = frameConfig.scaledWidth
156156
val scaledHeight = frameConfig.scaledHeight
157157
val scale = frameConfig.scale

Diff for: idea-plugin/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/
22
.gradle/
3-
.idea
3+
.idea
4+
.intellijPlatform

Diff for: idea-plugin/build.gradle.kts

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies {
2626
intellijPlatform {
2727
intellijIdeaCommunity(libs.versions.idea)
2828
instrumentationTools()
29+
pluginVerifier()
2930

3031
bundledPlugins("com.intellij.java", "org.jetbrains.kotlin", "com.intellij.gradle")
3132
}
@@ -41,7 +42,11 @@ intellijPlatform {
4142
channels = projectProperties.pluginChannels
4243
}
4344

44-
pluginVerification { ides { recommended() } }
45+
pluginVerification {
46+
ides {
47+
recommended()
48+
}
49+
}
4550
}
4651

4752
tasks {

Diff for: idea-plugin/src/main/kotlin/org/jetbrains/compose/desktop/ide/preview/PreviewToolWindow.kt

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ import java.awt.BorderLayout
1515
import org.jetbrains.compose.desktop.ide.preview.ui.PreviewPanel
1616

1717
class PreviewToolWindow : ToolWindowFactory, DumbAware {
18-
@Deprecated("Use isApplicableAsync")
19-
override fun isApplicable(project: Project): Boolean = isPreviewCompatible(project)
20-
2118
override suspend fun isApplicableAsync(project: Project): Boolean = isPreviewCompatible(project)
2219

2320
override fun init(toolWindow: ToolWindow) {

0 commit comments

Comments
 (0)