实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
- 为 IDE 菜单添加操作
- 修改操作注册或图标
- 整理操作名称和说明
创建或审查适用于IntelliJ New UI的SVG图标,整理浅色和深色主题版本,并按界面用途检查画布尺寸、配色、图形、文件位置及旧图标映射。
Create or review IntelliJ New UI SVG icons and theme variants.
实测评分 未实测
查看安装方法此技能协助创建或审查IntelliJ New UI使用的SVG图标。它会根据图标用途检查画布尺寸、文件位置、文件名以及线条和图形的绘制方式,并帮助按照官方调色板准备浅色和深色版本。替换Classic UI图标时,也会说明保留旧文件并在*IconMappings.json中添加映射的步骤。对于工具窗口图标,还会检查不同尺寸的文件是否采用相同的视觉主题。
为IntelliJ插件或平台添加图标、审查现有图标的主题适配或New UI显示,或者希望按规范确认SVG配色和尺寸的处理方式时,可以使用此技能。
图标应使用SVG制作,不使用图像、渐变、滤镜或嵌入字体。请保留Apache 2.0版权注释。颜色和文件位置等细节可参考palette.md等附带文件。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Guidance for authoring SVG icons for the New UI.
Background: the IDE maintains Classic UI and New UI in parallel. Code branches with ExperimentalUI.isNewUI(); icons follow the same split. Old icons stay in their original resource folders for Classic-UI compatibility. New-UI icons live under expui/ folders and are substituted for the old ones at runtime by icon mappers.
addFile.svg) and one for the dark theme with the _dark suffix (addFile_dark.svg). Geometry must be identical between them; only the palette swaps.
name.svg / name_dark.svg) and a 20×20 New-UI stripe variant (name@20x20.svg / name@20x20_dark.svg), they must share the same metaphor. The stripe is only one surface — the 16×16 base also appears in Search Everywhere, Find Action, context menus, the Services tool window, recent locations, and the View ▸ Tool Windows menu. Changing only the @20x20 leaves users seeing two different icons for the same tool window depending on where they encounter it. Always update all four files together (and the same applies to plugin-local icons like toolWindowChat.svg + toolWindowChat@20x20.svg).<path>, <rect>, <circle>, <line>, <polyline>, <polygon>). Text must be converted to outlines.fill="none" on the root <svg> and set fill / stroke explicitly per shape — never rely on CSS or currentColor.stroke-width="1", stroke-linecap="round", stroke-linejoin="round" (or stroke-miterlimit="10" for hard joins). Heavier strokes are reserved for hero glyphs inside a circle badge (e.g. status checkmarks) and use stroke-width="1.5" or "2".x.5) and fills on whole pixels so the icon stays crisp at 1× rendering.| Role | Canvas | Filename pattern | Reference dir |
|---|---|---|---|
| Action icons (menus, popups, toolbars) | 16×16 | name.svg + name_dark.svg | expui/actions/, expui/general/ |
| Tree node icons (PSI, structure view) | 16×16 | name.svg + name_dark.svg | expui/nodes/ |
| Tool-window stripe icons (legacy/16) | 16×16 | name.svg + name_dark.svg | expui/toolwindows/ |
| Tool-window stripe icons (New UI) | 20×20 | name@20x20.svg + name@20x20_dark.svg | expui/toolwindows/ |
| Main toolbar (New UI) | 20×20 | name@20x20.svg + name@20x20_dark.svg | expui/general/, expui/run/, expui/toolbar/ |
| Editor gutter icons | 14×14 (small marks 12×12, 9×9) | name.svg + name_dark.svg | expui/gutter/ |
| Status bar / inline status | 16×16 | name.svg + name_dark.svg | expui/status/, expui/inline/ |
| Breakpoint marks | 14×14 (12×12 for sub-marks) | name.svg + name_dark.svg | expui/breakpoints/ |
| Run-config tags & disclosure chevrons | 16×16 (chevron*.svg may be 9×9 to 16×16) | name.svg + name_dark.svg | expui/run/, expui/general/ |
| Welcome/onboarding & logos (system) | 16, 20, 28, 48 (per surface) | name.svg + name_dark.svg | expui/ide/, expui/welcome/ |
When in doubt, find a sibling icon in the same folder and copy its width / height / viewBox.
Two placements exist and both are valid — pick based on whether a Classic-UI icon already exists:
_dark sibling) under an expui/<role>/ resource root. Callers reference it directly through the plugin's generated <Plugin>Icons class.expui/<role>/ path, and add a mapping entry to the nearest *IconMappings.json. At runtime, when ExperimentalUI.isNewUI() is true, the mapper substitutes the New UI file for the Classic one so no caller has to change its icon reference.Mapping-file shape (excerpt from community/platform/icons/src/PlatformIconMappings.json):
{
"expui": {
"actions": {
"addFile.svg": "actions/addFile.svg",
"checked.svg": ["actions/checked.svg", "actions/setDefault.svg"]
}
}
}
Key = path relative to the expui/ root (the New UI file). Value = the Classic path(s) that should resolve to it. A single New UI icon may back multiple Classic paths.
<!-- Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- shapes, ordered back-to-front -->
</svg>
The dark variant is the same file with light-palette colors swapped for their dark-theme partner — see palette.md. Never change geometry between the two.
(cx=8, cy=8) for 16×16 and (cx=10, cy=10) for 20×20.1..15). For 20×20 use 2 px of padding. Stripe icons must stay visually balanced inside their 20×20 cell.nodes/class.svg): a light-tinted fill at radius 6.5 with a stroke in the accent color, plus a glyph filled with the same accent.
<circle cx="8" cy="8" r="6.5" fill="<accent-bg-light>" stroke="<accent-light>"/> then glyph fill="<accent-light>".fill="<accent-bg-dark>" stroke="<accent-dark>" and glyph filled with <accent-dark>.#6C707E light / #CED0D6 dark) at stroke-width="1". Use #818594 (light) / #6F737A (dark) for "secondary" stroke glyphs like dropdown chevrons.white.#5E4D33 inside #F2C55C warning) — never plain white.actions/addFile.svg): the base glyph uses the neutral gray, and the small "modifier" (+, ✕, ↻, gear) uses the primary blue accent. Light gray + blue accent → dark gray + blue accent in the dark variant.*_stroke.svg): outline-only, same neutral stroke color, no fills.The full lookup is in palette.md. Most icons only need:
| Role | Light | Dark |
|---|---|---|
| Primary stroke / fill | #6C707E | #CED0D6 |
| Secondary stroke | #818594 | #6F737A |
| Disabled / faint fill | #EBECF0 | #43454A |
| Accent — Blue | #3574F0 | #548AF7 |
| Accent — Blue (bg) | #EDF3FF / #E7EFFD | #25324D |
| Accent — Red | #DB3B4B | #DB5C5C |
| Accent — Red (bg) | #FFF7F7 | #402929 |
| Status — Error fill | #E55765 | #DB5C5C |
| Status — Warning fill | #FFAF0F | #F2C55C |
| Status — Success fill | #55A76A | #57965C |
| Accent — Green | #208A3C | #57965C |
| Accent — Green (bg) | #F2FCF3 | #253627 |
| Accent — Orange | #E66D17 | #C77D55 |
| Accent — Orange (bg) | #FFF4EB | #45322B |
| Accent — Yellow/Gold | #FFAF0F / #C27D04 | #F2C55C / #D6AE58 |
| Accent — Purple | #834DF0 | #B589EC |
| Accent — Purple (bg) | #FAF5FF | #2F2936 |
| White on dark badge | white | matching muted-dark fill (e.g. #5E4D33) |
Do not use plain #000000 or off-the-palette grays.
community/platform/icons/src/expui/<role>/ and read their SVG sources. Mirror their stroke/fill mix.width/height/viewBox matching the role, and fill="none" on <svg>._dark filename and swap each color for its dark-theme partner from the palette mapping. Keep paths byte-identical otherwise.expui/<role>/ resource folder; reference it from the plugin's <Plugin>Icons class.expui/<role>/, add a mapping entry to the nearest *IconMappings.json. Callers keep referencing the old path.currentColor, CSS, or <style> blocks. The IntelliJ icon loader requires explicit colors on every shape so it can do palette-based recoloring._dark variant. The icon will look fine in Light theme then turn invisible in Dark.#000) or pure-white (#FFF) fills outside the status-badge glyph pattern. They break under accent recoloring.*IconMappings.json entry when replacing a Classic icon — the Classic icon will keep showing in New UI mode.community/platform/icons/src/expui/ — when reviewing, diff your new icon against a sibling there.Icons guidelines.svg is a design sheet (visual reference only; not machine-readable). When it disagrees with the folder, trust the folder.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
将 IntelliJ JPS 测试模块迁移到 Bazel,并排查仅在 Bazel 中出现的失败。根据症状检查依赖、插件、测试数据和 runfiles,重新生成并验证目标。
按 IntelliJ 项目规范编写或审查 Kotlin 和 Java 代码,涵盖语言选择、格式、密封类型、线程注解及控制流异常处理。
本指南帮助您按 IntelliJ 项目规则拆分更改并撰写提交信息:有工单时使用编号和变更说明,无工单时使用标签与子系统名,并在需要时说明原因和决定。
使用多个 Python 类型检查器比较代码片段或文件的类型推断和报错判断,并汇总各工具的结论、耗时与诊断信息,可保存为 Markdown 报告。
整理 Compose Desktop 界面中的状态和副作用,让可组合函数负责绘制,由展示器或协调器处理应用决策。了解状态归属、Effect、可复用组件接口、延迟列表键、动画和性能,适用于单项界面修改。