Skip to content

使用官方插件模板重构项目结构#34

Open
zzqo wants to merge 3 commits intonetnexus:masterfrom
zzqo:master
Open

使用官方插件模板重构项目结构#34
zzqo wants to merge 3 commits intonetnexus:masterfrom
zzqo:master

Conversation

@zzqo
Copy link
Copy Markdown

@zzqo zzqo commented Mar 6, 2026

  • 使用官方插件模板重构项目结构
  • 添加国际化支持

zzqo added 3 commits March 6, 2026 16:43
- 在 apply 方法中添加 null 检查避免 mGUI 为空时抛出异常
- 注释掉 plugin.xml 中的 add-to-group 配置项以移除编辑器菜单组关联
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"));
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

presentation.setText(...) 被调用了两次,第二次会覆盖第一次的 Action 标题;这里应当设置的是描述(description)。建议将第 18 行改为 presentation.setDescription(...)

Suggested change
presentation.setText(CamelCaseBundle.message("action.toggleCamelCase.description"));
presentation.setDescription(CamelCaseBundle.message("action.toggleCamelCase.description"));

Copilot uses AI. Check for mistakes.

### Release 3.0.11:
* Bugfix: if only camelCase and snake_case is selected in the options
- Fixed bug with multiple careats
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'careats' to 'carets'.

Suggested change
- Fixed bug with multiple careats
- Fixed bug with multiple carets

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants