mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[jewel] Only set skiko path if it was properly extracted
GitOrigin-RevId: f2054406713370053a5fef679db9d87ffd4af57a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cc75c0c77a
commit
97e363c243
@@ -4,8 +4,8 @@ composeDesktop = "1.8.0-alpha04"
|
||||
detekt = "1.23.6"
|
||||
dokka = "2.0.0"
|
||||
filepicker = "3.1.0"
|
||||
idea = "251.23774.109"
|
||||
intelliJPlatformBuild = "251.23774.109-EAP-SNAPSHOT"
|
||||
idea = "251.23774.318"
|
||||
intelliJPlatformBuild = "251.23774.318-EAP-SNAPSHOT"
|
||||
ideaPlugin = "2.4.0"
|
||||
jna = "5.17.0"
|
||||
kotlin = "2.1.10"
|
||||
|
||||
+8
-6
@@ -13,16 +13,16 @@ import androidx.compose.ui.platform.LocalWindowInfo
|
||||
import androidx.compose.ui.unit.toSize
|
||||
import com.intellij.openapi.actionSystem.DataSink
|
||||
import com.intellij.openapi.actionSystem.UiDataProvider
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.PathManager
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import java.awt.BorderLayout
|
||||
import java.io.File
|
||||
import javax.swing.JComponent
|
||||
import javax.swing.JPanel
|
||||
import org.jetbrains.jewel.bridge.actionSystem.ComponentDataProviderBridge
|
||||
import org.jetbrains.jewel.bridge.theme.SwingBridgeTheme
|
||||
import org.jetbrains.jewel.foundation.ExperimentalJewelApi
|
||||
import org.jetbrains.jewel.foundation.InternalJewelApi
|
||||
import org.jetbrains.jewel.foundation.util.JewelLogger
|
||||
|
||||
@Suppress("ktlint:standard:function-naming", "FunctionName") // Swing to Compose bridge API
|
||||
public fun JewelComposePanel(config: ComposePanel.() -> Unit = {}, content: @Composable () -> Unit): JComponent =
|
||||
@@ -85,10 +85,12 @@ public fun JewelToolWindowNoThemeComposePanel(
|
||||
|
||||
private fun createJewelComposePanel(config: ComposePanel.(JewelComposePanelWrapper) -> Unit): JewelComposePanelWrapper {
|
||||
if (System.getProperty("skiko.library.path") == null) {
|
||||
System.setProperty("skiko.library.path", PathManager.getLibPath() + "/skiko-awt-runtime-all")
|
||||
}
|
||||
if (ApplicationManager.getApplication().isInternal) {
|
||||
System.setProperty("compose.swing.render.on.graphics", Registry.stringValue("compose.swing.render.on.graphics"))
|
||||
val bundledSkikoFolder = File(PathManager.getLibPath(), "/skiko-awt-runtime-all")
|
||||
if (bundledSkikoFolder.isDirectory && bundledSkikoFolder.canRead()) {
|
||||
System.setProperty("skiko.library.path", PathManager.getLibPath() + "/skiko-awt-runtime-all")
|
||||
} else {
|
||||
JewelLogger.getInstance("SkikoLoader").warn("Bundled Skiko not found/not readable, falling back to default")
|
||||
}
|
||||
}
|
||||
val jewelPanel = JewelComposePanelWrapper()
|
||||
jewelPanel.layout = BorderLayout()
|
||||
|
||||
+7
-7
@@ -1,9 +1,9 @@
|
||||
<idea-plugin>
|
||||
<dependencies>
|
||||
<module name="intellij.platform.jewel.markdown.core" />
|
||||
<module name="intellij.platform.jewel.ui" />
|
||||
<module name="intellij.platform.jewel.foundation" />
|
||||
<module name="intellij.platform.jewel.intUi.standalone" />
|
||||
<module name="intellij.platform.jewel.markdown.extensions.gfmAlerts"/>
|
||||
</dependencies>
|
||||
<dependencies>
|
||||
<module name="intellij.platform.jewel.markdown.core"/>
|
||||
<module name="intellij.platform.jewel.ui"/>
|
||||
<module name="intellij.platform.jewel.foundation"/>
|
||||
<module name="intellij.platform.jewel.intUi.standalone"/>
|
||||
<module name="intellij.platform.jewel.markdown.extensions.gfmAlerts"/>
|
||||
</dependencies>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -32,21 +32,19 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
intellijPlatform { intellijIdeaCommunity(libs.versions.idea) }
|
||||
intellijPlatform {
|
||||
intellijIdeaCommunity(libs.versions.idea)
|
||||
|
||||
implementation(projects.samples.showcase) { exclude(group = "org.jetbrains.kotlinx") }
|
||||
implementation(projects.ideLafBridge) { exclude(group = "org.jetbrains.kotlinx") }
|
||||
implementation(projects.markdown.ideLafBridgeStyling) { exclude(group = "org.jetbrains.kotlinx") }
|
||||
|
||||
implementation(compose.desktop.currentOs) {
|
||||
exclude(group = "org.jetbrains.compose.material")
|
||||
exclude(group = "org.jetbrains.kotlinx")
|
||||
bundledModule("intellij.platform.jewel.foundation")
|
||||
bundledModule("intellij.platform.jewel.ui")
|
||||
bundledModule("intellij.platform.jewel.ideLafBridge")
|
||||
bundledModule("intellij.platform.jewel.markdown.core")
|
||||
bundledModule("intellij.platform.jewel.markdown.ideLafBridgeStyling")
|
||||
bundledModule("intellij.libraries.compose.foundation.desktop")
|
||||
bundledModule("intellij.libraries.skiko")
|
||||
}
|
||||
|
||||
// TODO remove once https://youtrack.jetbrains.com/issue/IJPL-166436 is fixed
|
||||
implementation("androidx.lifecycle:lifecycle-common-jvm:2.8.5") { exclude(group = "org.jetbrains.kotlinx") }
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-desktop:2.8.5") { exclude(group = "org.jetbrains.kotlinx") }
|
||||
// END TODO
|
||||
implementation(projects.samples.showcase) { exclude(group = "org.jetbrains.kotlinx") }
|
||||
}
|
||||
|
||||
intellijPlatform {
|
||||
|
||||
+27
-29
@@ -49,9 +49,7 @@ import org.jetbrains.jewel.bridge.JewelComposePanel
|
||||
import org.jetbrains.jewel.bridge.medium
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.ui.component.DefaultButton
|
||||
import org.jetbrains.jewel.ui.component.EditableListComboBox
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.ListComboBox
|
||||
import org.jetbrains.jewel.ui.component.OutlinedButton
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.TextArea
|
||||
@@ -278,12 +276,12 @@ internal class SwingComparisonTabPanel : BorderLayoutPanel() {
|
||||
Text("Not editable")
|
||||
Text(text = "Selected item: $selectedText")
|
||||
|
||||
ListComboBox(
|
||||
items = comboBoxItems,
|
||||
selectedIndex = selectedIndex,
|
||||
onSelectedItemChange = { selectedIndex = it },
|
||||
modifier = Modifier.width(200.dp),
|
||||
)
|
||||
// ListComboBox(
|
||||
// items = comboBoxItems,
|
||||
// selectedIndex = selectedIndex,
|
||||
// onSelectedItemChange = { selectedIndex = it },
|
||||
// modifier = Modifier.width(200.dp),
|
||||
// )
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -293,13 +291,13 @@ internal class SwingComparisonTabPanel : BorderLayoutPanel() {
|
||||
Text("Not editable + disabled")
|
||||
Text(text = "Selected item: $selectedText")
|
||||
|
||||
ListComboBox(
|
||||
items = comboBoxItems,
|
||||
selectedIndex = selectedIndex,
|
||||
onSelectedItemChange = { selectedIndex = it },
|
||||
modifier = Modifier.width(200.dp),
|
||||
enabled = false,
|
||||
)
|
||||
// ListComboBox(
|
||||
// items = comboBoxItems,
|
||||
// selectedIndex = selectedIndex,
|
||||
// onSelectedItemChange = { selectedIndex = it },
|
||||
// modifier = Modifier.width(200.dp),
|
||||
// enabled = false,
|
||||
// )
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -309,13 +307,13 @@ internal class SwingComparisonTabPanel : BorderLayoutPanel() {
|
||||
Text("Editable")
|
||||
Text(text = "Selected item: $selectedText")
|
||||
|
||||
EditableListComboBox(
|
||||
items = comboBoxItems,
|
||||
selectedIndex = selectedIndex,
|
||||
onSelectedItemChange = { selectedIndex = it },
|
||||
modifier = Modifier.width(200.dp),
|
||||
maxPopupHeight = 150.dp,
|
||||
)
|
||||
// EditableListComboBox(
|
||||
// items = comboBoxItems,
|
||||
// selectedIndex = selectedIndex,
|
||||
// onSelectedItemChange = { selectedIndex = it },
|
||||
// modifier = Modifier.width(200.dp),
|
||||
// maxPopupHeight = 150.dp,
|
||||
// )
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -325,13 +323,13 @@ internal class SwingComparisonTabPanel : BorderLayoutPanel() {
|
||||
Text("Editable + disabled")
|
||||
Text(text = "Selected item: $selectedText")
|
||||
|
||||
EditableListComboBox(
|
||||
items = comboBoxItems,
|
||||
selectedIndex = selectedIndex,
|
||||
onSelectedItemChange = { selectedIndex = it },
|
||||
modifier = Modifier.width(200.dp),
|
||||
enabled = false,
|
||||
)
|
||||
// EditableListComboBox(
|
||||
// items = comboBoxItems,
|
||||
// selectedIndex = selectedIndex,
|
||||
// onSelectedItemChange = { selectedIndex = it },
|
||||
// modifier = Modifier.width(200.dp),
|
||||
// enabled = false,
|
||||
// )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,15 @@ A plugin that demonstrates the capabilities of the Jewel library and Compose.
|
||||
See the <a href="https://github.com/JetBrains/jewel">Jewel repository</a> for more information.
|
||||
]]></description>
|
||||
|
||||
<depends>com.intellij.modules.platform</depends>
|
||||
<dependencies>
|
||||
<module name="intellij.platform.jewel.foundation"/>
|
||||
<module name="intellij.platform.jewel.ui"/>
|
||||
<module name="intellij.platform.jewel.ideLafBridge"/>
|
||||
<module name="intellij.libraries.compose.foundation.desktop"/>
|
||||
<module name="intellij.libraries.skiko"/>
|
||||
<module name="intellij.platform.jewel.markdown.core"/>
|
||||
<module name="intellij.platform.jewel.markdown.ideLafBridgeStyling"/>
|
||||
</dependencies>
|
||||
|
||||
<resource-bundle>messages.JewelBundle</resource-bundle>
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":foundation"))
|
||||
implementation(project(":ui"))
|
||||
implementation(projects.markdown.core)
|
||||
compileOnly(project(":foundation"))
|
||||
compileOnly(project(":ui"))
|
||||
compileOnly(projects.markdown.core)
|
||||
testImplementation(compose.desktop.uiTestJUnit4)
|
||||
testImplementation(compose.desktop.currentOs) { exclude(group = "org.jetbrains.compose.material") }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user