实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
- 为 IDE 菜单添加操作
- 修改操作注册或图标
- 整理操作名称和说明
按 IntelliJ 项目规范编写或审查 Kotlin 和 Java 代码,涵盖语言选择、格式、密封类型、线程注解及控制流异常处理。
Apply IntelliJ Kotlin and Java code style when writing or reviewing.
实测评分 未实测
查看安装方法本技能会按照 IntelliJ 编码指南,协助编写和审查 Kotlin 与 Java 代码。新建文件默认使用 Kotlin;已有 Java 文件通常继续使用 Java,除非任务需要转换。它会检查扩展函数、数据类和空安全等 Kotlin 惯用写法,并要求为实验性 API 添加 @ApiStatus.Experimental。检查格式时会参考适用的 .editorconfig。
技能也会检查密封类型和枚举是否使用穷尽式 when 分支、线程要求注解的默认值,以及异常处理规则。捕获 Throwable 或 Exception 时,应先调用 rethrowControlFlowException,避免将控制流异常写入日志。它还涵盖构建脚本中的 Kotlin 规范。
在 IntelliJ 代码库中添加功能、审查现有代码或调整格式时,可以用它核对语言选择、密封类型分支、线程注解和异常处理是否符合项目约定。
创建或审查 Java 代码前,请先阅读 references/modern-java.md。处理构建脚本时,请另行参考指定的 Kotlin 风格建议。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Follow the IntelliJ Coding Guidelines with these IntelliJ-specific rules.
@ApiStatus.Experimentalcommunity/platform/build-scripts/kotlin-style-recommendations.md for build-scripts code:
@JvmField for internal data class fields.put()/.get() instead of [] operatorHashMap/HashSet/LinkedHashMap instead of mutableMapOf()/mutableSetOf()when branch, an is check, or a catch, open the declaration of the type.when. Do not use an is check, an as? cast, an == comparison, or else. In Eel and IJent code, this is a rule, also for a private type. See community/platform/eel/docs/api/exhaustive-when.md..editorconfig before you review or change formatting..editorconfig value for each setting. If no file defines a setting, use these defaults:
else, catch, and finally on new lines/rustrover directory you must always use standard Kotlin formatting rules with 4 spaces indentation.@RequiresEdt, @RequiresBackgroundThread, @RequiresReadLock, @RequiresWriteLock,
or @RequiresReadLockAbsence, do not pass generateAssertion. Keep the default value unless the user explicitly requests a different one.generateAssertion = false /* IJPL-115548 */. It is a legacy mass-migration marker. Do not copy it from existing code.generateAssertion = false only when the user explicitly requests it, or when the runtime assertion is known to fail. State the reason in a comment.@RequiresEdt
fun updateUi() { ... }
catch block for Throwable or Exception, call com.intellij.diagnostic.rethrowControlFlowException(e) first.
It rethrows a control flow exception, such as CancellationException. A control flow exception must never reach the log.CancellationException explicitly, and do not test the exception type by hand.com.intellij.diagnostic.ControlFlowExceptionsKt.rethrowControlFlowException.com.intellij.openapi.diagnostic.rethrowControlFlowException.try {
doWork()
}
catch (e: Throwable) {
rethrowControlFlowException(e)
LOG.error(e)
}
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
将 IntelliJ JPS 测试模块迁移到 Bazel,并排查仅在 Bazel 中出现的失败。根据症状检查依赖、插件、测试数据和 runfiles,重新生成并验证目标。
本指南帮助您按 IntelliJ 项目规则拆分更改并撰写提交信息:有工单时使用编号和变更说明,无工单时使用标签与子系统名,并在需要时说明原因和决定。
使用多个 Python 类型检查器比较代码片段或文件的类型推断和报错判断,并汇总各工具的结论、耗时与诊断信息,可保存为 Markdown 报告。
整理 Compose Desktop 界面中的状态和副作用,让可组合函数负责绘制,由展示器或协调器处理应用决策。了解状态归属、Effect、可复用组件接口、延迟列表键、动画和性能,适用于单项界面修改。
审查 Compose Desktop 界面代码的架构和运行时问题,检查状态管理、副作用、协程、延迟列表、动画与重组,并按优先级列出发现。