Open
Conversation
zzqo
commented
Mar 6, 2026
- 使用官方插件模板重构项目结构
- 添加国际化支持
- 添加国际化支持
- 在 apply 方法中添加 null 检查避免 mGUI 为空时抛出异常 - 注释掉 plugin.xml 中的 add-to-group 配置项以移除编辑器菜单组关联
There was a problem hiding this comment.
Pull request overview
本次 PR 以官方 IntelliJ 插件模板为基础重构项目结构,并引入国际化(i18n)资源与构建配置,以便更符合模板约定并支持多语言显示。
Changes:
- 按官方模板重组包结构(core/config/ui/action/i18n),并迁移原有类
- 添加 i18n Bundle 与中英文资源文件,用于 Action/UI 文案
- 引入官方模板的 Gradle 构建/验证/运行配置(wrapper、version catalog、run configs 等)
Reviewed changes
Copilot reviewed 23 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/messages/CamelCaseBundle_zh.properties | 添加中文资源键值,用于 Action/UI 文案国际化 |
| src/main/resources/messages/CamelCaseBundle.properties | 添加英文默认资源键值 |
| src/main/java/de/netnexus/camelcase/i18n/CamelCaseBundle.java | 引入 DynamicBundle 以支持 IntelliJ 官方推荐的 i18n 方式 |
| src/main/java/de/netnexus/camelcase/action/ToggleCamelCaseAction.java | 新增 Action 类并在构造时设置展示文案(i18n) |
| src/de/netnexus/CamelCasePlugin/ToggleCamelCase.java | 删除旧 Action 入口类(迁移到新包结构) |
| src/de/netnexus/CamelCasePlugin/OptionGui.java | 迁移到新包、增加 UI 文案本地化、增加 isModified 实现 |
| src/de/netnexus/CamelCasePlugin/OptionGui.form | 更新 UI Designer 绑定类与新增 orderLabel 绑定 |
| src/de/netnexus/CamelCasePlugin/Conversion.java | 迁移到 core 包、公开 API、改进 token 空串判断 |
| src/de/netnexus/CamelCasePlugin/CamelCasePluginConfigurable.java | 迁移到 ui 包、接入新的 isModified/apply 行为 |
| src/de/netnexus/CamelCasePlugin/CamelCaseEditorActionHandler.java | 迁移到 core 包、构造器改为 public、格式化 transform 参数 |
| src/de/netnexus/CamelCasePlugin/CamelCaseConfig.java | 迁移到 config 包(plugin.xml 对应更新) |
| settings.gradle.kts | 增加 rootProject.name 与 toolchain resolver 插件(模板化) |
| gradlew.bat | 添加 Windows Gradle Wrapper 脚本(模板化) |
| gradlew | 添加 POSIX Gradle Wrapper 脚本(模板化) |
| gradle/wrapper/gradle-wrapper.properties | 添加 wrapper 分发配置 |
| gradle/libs.versions.toml | 引入版本目录(version catalog),集中管理依赖/插件版本 |
| gradle.properties | 添加插件/平台/Gradle 版本与缓存配置(模板化) |
| build.gradle.kts | 引入 IntelliJ Platform Gradle Plugin 模板构建、发布、验签、验证与测试配置 |
| README.md | 按模板添加 “Plugin description” 截取标记,供构建脚本提取 |
| META-INF/plugin.xml | 迁移 Action/Service/Configurable 的实现类引用(适配新包路径)并移除旧 description/change-notes |
| CHANGELOG.md | 迁移到 keep-a-changelog 风格并新增 3.0.13 条目 |
| .run/Run Verifications.run.xml | 添加 verifyPlugin 运行配置(模板化) |
| .run/Run Tests.run.xml | 添加 check 运行配置(模板化) |
| .run/Run Plugin.run.xml | 添加 runIde 运行配置(模板化) |
| .gitignore | 扩充为更完整的 macOS/JetBrains/Java 忽略规则集合 |
Files not reviewed (1)
- .idea/gradle.xml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| Presentation presentation = getTemplatePresentation(); | ||
| presentation.setText(CamelCaseBundle.message("action.toggleCamelCase.text")); | ||
| presentation.setText(CamelCaseBundle.message("action.toggleCamelCase.description")); |
There was a problem hiding this comment.
presentation.setText(...) 被调用了两次,第二次会覆盖第一次的 Action 标题;这里应当设置的是描述(description)。建议将第 18 行改为 presentation.setDescription(...)。
Suggested change
| presentation.setText(CamelCaseBundle.message("action.toggleCamelCase.description")); | |
| presentation.setDescription(CamelCaseBundle.message("action.toggleCamelCase.description")); |
|
|
||
| ### Release 3.0.11: | ||
| * Bugfix: if only camelCase and snake_case is selected in the options | ||
| - Fixed bug with multiple careats |
There was a problem hiding this comment.
Corrected spelling of 'careats' to 'carets'.
Suggested change
| - Fixed bug with multiple careats | |
| - Fixed bug with multiple carets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.