From efa75963ff5fb4bed208beb482f165ef398b9c9b Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Fri, 12 Jan 2024 19:14:00 +0100 Subject: [PATCH] Fix static analysis issues --- ide-laf-bridge/api/ide-laf-bridge.api | 9 ++++----- .../org/jetbrains/jewel/bridge/SwingBridgeService.kt | 2 +- .../org/jetbrains/jewel/bridge/theme/IntUiBridge.kt | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ide-laf-bridge/api/ide-laf-bridge.api b/ide-laf-bridge/api/ide-laf-bridge.api index 2bf12ffed2..815256ca60 100644 --- a/ide-laf-bridge/api/ide-laf-bridge.api +++ b/ide-laf-bridge/api/ide-laf-bridge.api @@ -15,15 +15,14 @@ public final class org/jetbrains/jewel/bridge/BridgeUtilsKt { public static final fun retrieveInsetsAsPaddingValues (Ljava/lang/String;)Landroidx/compose/foundation/layout/PaddingValues; public static final fun retrieveIntAsDp (Ljava/lang/String;)F public static final fun retrieveIntAsDpOrUnspecified (Ljava/lang/String;)F - public static final fun retrieveTextStyle (Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun retrieveTextStyle$default (Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun retrieveTextStyle-_Wfy91w (Ljava/lang/String;JJZIJLkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun retrieveTextStyle-_Wfy91w$default (Ljava/lang/String;JJZIJLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun retrieveTextStyle (Ljava/lang/String;Ljava/lang/String;)Landroidx/compose/ui/text/TextStyle; + public static synthetic fun retrieveTextStyle$default (Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Landroidx/compose/ui/text/TextStyle; + public static final fun retrieveTextStyle-WdJyH8Q (Ljava/lang/String;JJZIJ)Landroidx/compose/ui/text/TextStyle; + public static synthetic fun retrieveTextStyle-WdJyH8Q$default (Ljava/lang/String;JJZIJILjava/lang/Object;)Landroidx/compose/ui/text/TextStyle; public static final fun toComposeColor (Ljava/awt/Color;)J public static final fun toComposeColorOrUnspecified (Ljava/awt/Color;)J public static final fun toDpSize (Lcom/intellij/util/ui/JBDimension;)J public static final fun toDpSize (Ljava/awt/Dimension;)J - public static final fun toFontFamily (Ljava/awt/Font;)Landroidx/compose/ui/text/font/FontFamily; public static final fun toPaddingValues (Lcom/intellij/util/ui/JBInsets;)Landroidx/compose/foundation/layout/PaddingValues; public static final fun toPaddingValues (Ljava/awt/Insets;)Landroidx/compose/foundation/layout/PaddingValues; } diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/SwingBridgeService.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/SwingBridgeService.kt index 3d25a7719c..7264d6dd59 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/SwingBridgeService.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/SwingBridgeService.kt @@ -36,7 +36,7 @@ internal class SwingBridgeService(scope: CoroutineScope) { return readThemeData() } - private suspend fun readThemeData(): BridgeThemeData { + private fun readThemeData(): BridgeThemeData { val themeDefinition = createBridgeThemeDefinition() return BridgeThemeData( themeDefinition = createBridgeThemeDefinition(), diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt index 758f52a75b..107e6b1f26 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt @@ -119,7 +119,7 @@ private val iconsBasePath get() = DirProvider().dir() @OptIn(DependsOnJBR::class) -internal suspend fun createBridgeThemeDefinition(): ThemeDefinition { +internal fun createBridgeThemeDefinition(): ThemeDefinition { val textStyle = retrieveTextStyle("Label.font", "Label.foreground") return createBridgeThemeDefinition(textStyle) } @@ -141,7 +141,7 @@ internal fun createBridgeThemeDefinition(textStyle: TextStyle): ThemeDefinition } @OptIn(DependsOnJBR::class) -internal suspend fun createBridgeComponentStyling( +internal fun createBridgeComponentStyling( theme: ThemeDefinition, ) = createBridgeComponentStyling(