IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
- IDEに新しいアクションを追加したいとき
- アクションの登録やアイコンを変更したいとき
- 表示名と説明文の定義を整理したいとき
Jewelのテーマやコンポーネントを使い、IntelliJプラグインと単体のCompose Desktopアプリに合ったUIを組み立てる方法を案内します。
Build UI with Jewel components and themes.
実行スコア 未検証
インストール方法を見るJewelのテーマ、コンポーネント、レイアウト、アイコン、タイポグラフィを使ったCompose UIの実装を案内します。まず実行環境をIntelliJプラグインか単体のCompose Desktopアプリかに分け、それぞれに合うSwingBridgeThemeまたはIntUiThemeを選びます。ボタンや選択肢、入力欄などは用途に合うコンポーネントを選び、色やサイズはテーマから取得します。アイコンの読み込み方法やカスタムテーマ、画面を小さなComposableに分ける考え方も扱います。IntelliJ Platformの状態やサービスへのアクセスはComposableの外に置き、画面には状態を渡してイベントを返す構成を勧めます。
IntelliJ風のデスクトップ画面を作るとき、プラグインと単体アプリのテーマ設定を選びたいとき、またはUI部品やアイコンの使い分けを確認したいときに役立ちます。
Jewelは完全なフォント・描画動作にJetBrains Runtimeを必要とします。ComposeとSwingの埋め込み方法は対象外で、主にToolWindowやComposePanelの設定を扱う場合はjewel-swing-interopが対象です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Implement UI with Jewel by first selecting the runtime context, then applying the correct theme wrapper, then using Jewel components and icon APIs.
Standalone:
IntUiTheme(isDark = false) {
App()
}
IntelliJ plugin:
SwingBridgeTheme {
App()
}
Icon loading:
object MyIcons {
val Settings = PathIconKey("icons/settings.svg", MyIcons::class.java)
}
Icon(key = MyIcons.Settings, contentDescription = "Settings")
Decorated window (standalone, custom title bar):
IntUiTheme(
theme = themeDefinition,
styling = ComponentStyling.default().decoratedWindow(
titleBarStyle = TitleBarStyle.light(),
),
) {
DecoratedWindow(onCloseRequest = ::exitApplication) {
TitleBar { /* title bar content */ }
App()
}
}
Customize the title bar (colors, metrics, and fullscreen-control handling) by passing TitleBarStyle to
ComponentStyling.default().decoratedWindow(...), not through IntUiTheme(isDark = ...) alone.
This skill covers Jewel's theme wrappers, components, layout, icons, and typography — the Compose side of the UI. It does not cover Compose-in-Swing embedding mechanics. If the user's question is primarily about:
ToolWindowFactory / ToolWindow contentComposePanel or wiring setContentplugin.xml tool window extensionsenableNewSwingCompositing and related compositing/AWT flagsLocalComponent and Swing ↔ Compose bidirectional integration…the correct response is to name jewel-swing-interop explicitly as the skill for that work and stop. Do not walk
through ToolWindowFactory / ComposePanel / plugin.xml setup here, even if you know how. You can still state that
content inside the ComposePanel must use SwingBridgeTheme (a theming concern, in scope), and defer the rest to
jewel-swing-interop.
Decide runtime before writing code:
SwingBridgeTheme) and IntelliJ bundled modules.IntUiTheme and standalone Jewel dependencies.For agent-generated desktop UI prototypes, prefer a Jewel/desktop preview or sandbox when one is available. Choose Material-style mobile previews only deliberately for mobile/Android-targeting prototypes or when the user explicitly wants a mobile device-frame preview; Material styling is not the general desktop default.
If context is unclear, inspect build files and imports first:
org.jetbrains.jewel.bridge.theme.SwingBridgeTheme implies plugin context.org.jetbrains.jewel.intui.standalone.theme.IntUiTheme implies standalone context.Use STANDALONE-VS-BRIDGE.md for dependency and wrapper snippets.
Do not leak or access IntelliJ Platform APIs (IJPL) directly or indirectly inside Jewel/Compose composition.
Composables must render explicit state and emit events; IntelliJ Platform interaction belongs at the presenter,
controller, service, or action boundary.
Avoid calling or indirectly reaching from composition into platform services, application state, registry, action system, project model, PSI, VFS, message bus, disposables, or other platform-owned mutable/thread-bound APIs. This protects recomposition stability, preview/test isolation, and compatibility across IntelliJ Platform updates.
Preferred pattern:
If direct or indirect platform access from composition is unavoidable, pass an injected collaborator as a parameter or composition-local dependency that tests can replace with a fake. Keep the collaborator surface minimal and exclude platform objects from stable UI state. Manage threading, read/write actions, disposables, and Compose stability explicitly.
Use the simplest valid theme API first:
IntUiTheme(isDark = ...).IntUiTheme(theme = ..., styling = ..., swingCompatMode = ...).SwingBridgeTheme { ... }.When implementing custom standalone themes:
ThemeDefinition via JewelTheme.lightThemeDefinition(...) or JewelTheme.darkThemeDefinition(...).JewelTheme.createDefaultTextStyle() and JewelTheme.createEditorTextStyle().ComponentStyling.default().with(...) (or specialized style builders).Use THEMING.md for concrete patterns. Use THEMING-COLORS.md for color-palette and semantic-color guidance. Use TYPOGRAPHY.md for text-style guidance and when-to-use rules.
Do not key remember only by JewelTheme.name, a LaF name, or another human-readable label when the cached value is
derived from theme data. Colours, metrics, typography, icon data, and Swing defaults can change while the visible theme
name stays the same.
Prefer the narrowest correct key:
remember.JewelTheme.instanceUuid.Use JewelTheme.instanceUuid as an invalidation token for theme-instance changes, not as a blanket replacement for
precise keys. Avoid JewelTheme.name as a proxy for theme state.
Before writing component code, check COMPONENT-SELECTION.md for the when-to-use rule. Jewel implements the JetBrains IntelliJ Platform UI Guidelines — those guidelines constrain which control fits a given interaction, not just which APIs exist.
Most common decisions:
RadioButtonRow under a GroupHeader (label ends with :). Do not
use three DefaultButtons.CheckboxRow controls, and use
ThreeStateCheckbox for a "select all" parent.ListComboBox / ComboBox.DefaultButton for the primary action in a form or dialog and OutlinedButton for secondary or cancel actions.
Never place two DefaultButton controls side by side.Tooltip carrying the action name + keyboard shortcut. Every icon-only control needs
one.TextField for one-line; TextArea for multi-line / newline-valid content (commit messages,
descriptions, code).Use COMPONENT-SELECTION.md for the full decision tables and LABEL-RULES.md for label-writing conventions.
Use Jewel components from org.jetbrains.jewel.ui.component for IntelliJ-styled UI.
Row, Column, Box) for composition.DefaultButton, OutlinedButton, TextField, Checkbox, Tabs, etc.) for interactive
primitives.Use local samples as source-of-truth examples:
Use LAYOUT-PATTERNS.md for composition archetypes extracted from those sample apps. Use COMPONENTS-CATALOG.md for component-by-component catalog guidance.
Treat composables like any other production code: keep them clean, clear, and as small as practical. Avoid huge composables with deep nesting and mixed responsibilities. Extract sub-composables when a branch, section, row, toolbar, footer, popup, or repeated layout block has a distinct purpose.
Organize files so readers can follow the UI top-down: put public entry-point composables near the top, then the private sub-composables they call in usage order. Keep helper functions, constants, and state-holder glue close to the code that uses them unless project conventions say otherwise.
Reusable composables are APIs. Give public or cross-file reusable composables KDoc that states their purpose, key parameters, slot expectations, and any non-obvious behavior. For high-level API design, use the AndroidX Compose guidance as a reference, adapted for Desktop/Jewel rather than Android-only APIs:
Do not copy those guidelines wholesale into this skill; link to the source so the guidance stays current.
Use IconKey-based loading for portability across standalone and bridge:
PathIconKey(path, iconClass) when icon path is the same across old/new UI.IntelliJIconKey(oldUiPath, newUiPath, iconClass) when paths differ.Icon(key = ..., contentDescription = ...) or Image(iconKey = ...) instead of deprecated raw
painterResource.AllIconsKeys for IntelliJ platform icons.When using AllIconsKeys in standalone apps, make sure IntelliJ icons are on the classpath (recommended:
com.jetbrains.intellij.platform:icons).
Use PainterHint only when you need stateful or dynamic paths or runtime icon patching behavior.
When debugging icon-not-found errors, confirm runtime context (standalone vs plugin) before recommending a fix —
AllIconsKeys availability and classpath layout differ between the two. Ask the user if context is not clear from the
question.
Use ICONS.md for icon patterns and pitfalls.
When citing source in responses, prefer master links for always-latest behavior:
Icon composable)Treat this skill as Jewel-version scoped.
libs.versions.toml, build.gradle.kts) first; ask only if ambiguous.master links with release-tag links.Before finishing:
IntUiTheme vs SwingBridgeTheme).IconKey and classpath-friendly resource resolution.remember values are either uncached, keyed by the concrete values they use, or keyed by
JewelTheme.instanceUuid when broad theme/LaF state is the dependency; do not key them by JewelTheme.name alone.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
IntelliJのJPSテストモジュールをBazelへ移行し、Bazelだけで起きる失敗を依存関係や実行環境から切り分ける手順を案内します。
IntelliJのKotlin・Javaコードを新規作成やレビューする際に、言語の選び方、書式、型の扱い、例外処理などのプロジェクト規約に沿って整えるスキルです。
IntelliJ向けの変更を適切な単位に分け、チケットの有無に応じた形式で、理由や判断も伝わるコミットメッセージを作成・修正するスキルです。
Pythonコードの型推論や型エラーを複数の型チェッカーで比較し、各ツールの判定と診断内容をまとめたレポートを作成します。
Compose Desktopの画面で状態や副作用をどこに持たせるか整理し、表示と判断の境界、再利用部品やリストの設計を整えます。