Title: feat(settings): 为语言与编译器设置页添加实时预览画布(settingRegions.view) by 1lck · Pull Request #40 · Lithe-IDEA/lithe-plugin-java · GitHub
Open Graph Title: feat(settings): 为语言与编译器设置页添加实时预览画布(settingRegions.view) by 1lck · Pull Request #40 · Lithe-IDEA/lithe-plugin-java
X Title: feat(settings): 为语言与编译器设置页添加实时预览画布(settingRegions.view) by 1lck · Pull Request #40 · Lithe-IDEA/lithe-plugin-java
Description: 关联 Issue / Linked issue
无(对齐 lithe-plugin-go 的设置页 settingRegions[].view 实时画布预览,关联宿主 Lithe-IDEA #2183 / #2191)
PR 类型 / Type
feat:新功能或用户可见的改进
fix:缺陷修复
docs:文档、Agent Note、Skill 等规则文件
release:稳定版发布准备
改动说明 / What changes
背景 / Why
Previously, lithe-plugin-java only declared settingRegions keywords on language (语言与框架 › Java) and compiler (构建、执行、部署 › 编译器 › Java 编译器), without contributing a view.function preview canvas like lithe-plugin-go. Users editing Java Language Server heap size, folder, log level, project model detection, or servlet container folder had no live visual preview above the setting rows, and the Java Compiler page did not show the configuration precedence hierarchy before clicking 读取编译设置.
改动 / Changes
io.github.lithe-idea.java-support/plugin.json:
在 requires 中新增 "ui": 0,在 permissions 中新增 "ui.contribute"。
为 settingRegions 的 language 与 compiler 两项补充 "view": { "function": "settings.view" }。
contract.lock.json 与 compiler-host.json:
将 contract.lock.json 升级至 Lithe-IDEA/Lithe-core-rust 0b6da2725ded74de7c3b62b49d12c1947dc0a38a,并锁定 plugin-ui.schema.json 的 SHA-256。
将 compiler-host.json 升级至宿主 76f8a663f18cafa3405da47ceede1ebd450d858f 与同一 Core 修订。
backend/src/settings_view.rs 与 backend/src/lib.rs:
新增 settings.view(SETTINGS_VIEW_FUNCTION_ID)视图处理函数,支持 open / settings / resize 事件、中英文双语、草稿高亮与宽度自适应(带 "on": ["resize"],无 width 时省略 on 并回退安全默认宽度):
language 区域:渲染 4 张实时联动草稿的预览卡片(JDT LS 内存与目录、语言服务器日志级别、自动识别工程模型、Servlet 容器文件夹),宽度 >= 594 时双列 2×2 网格,窄宽度下自动切为单列。
compiler 区域:渲染三层编译配置生效顺序图(模块 .settings/org.eclipse.jdt.core.prefs › 构建工具 pom.xml / build.gradle (.kts) › 项目 JDK 默认级别),默认回退宽度 340.0 以适配三栏编译器页最窄详情区。
在 backend/src/lib.rs 注册 settings.view 并调用 suppress_success_diagnostics("settings.view") 抑制高频成功 INFO 日志;参数非法返回 settings_view.invalid_params(-32602),未识别设置值通过 context.diagnostics().degraded("settings.view", "settings_view.setting_unrecognized", Some(count)) 上报计数并回退默认值;将 VIEW_ERROR_CODES 与 VIEW_CATEGORIES 纳入全局错误码唯一性断言。
backend/tests/repository_pins.rs:
在 manifest_and_zh_hans_declare_setting_regions 中新增 requires.ui == 0、permissions 含 "ui.contribute" 及两个 settingRegions 的 view.function == "settings.view" 断言。
scripts/compiler/visual.mjs 与 e2e/host/desktop/internal/settingswindow/plugin_native_source_test.go:
visual.mjs 先编译 lithe-java-backend 并通过 LITHE_NATIVE_BACKEND 传给无头测试。
plugin_native_source_test.go 通过 Core StartPluginBackend 启动有界生命周期的后端会话(t.Cleanup 等待在途请求并执行 StopPluginBackend + DestroyPluginBackend),实现 PluginViewLoader.View 调用 settings.view 与 ApplyPluginViewResult,等待区域预览绘制完成后同时抓取 java-settings-{zh-Hans,en}-{dark,light}.png 与 java-compiler-settings-{zh-Hans,en}-{dark,light}.png。
docs/feature-matrix.md、README.md 与 docs/assets/project-models/java-settings-zh-light.png:
更新权限表、统一日志表、功能矩阵验证记录,并更新仓库内中文浅色 Java 设置页示例截图。
不在本 PR 范围内 / Out of scope
无。
类型专属:feat
多平台对齐
Lithe 的目标是 macOS 与 Windows 能力对齐。必须选下面一项:
两端都具备:合入后 macOS 与 Windows 都具备该能力(插件后端 settings.view 与 plugin.json 声明跨平台共用,由 Viva 桌面端统一渲染)
只实现了 macOS:已为 Windows 提交跟进 Issue:#
只实现了 Windows:已为 macOS 提交跟进 Issue:#
刻意只属于某个平台(功能矩阵中另一端记为 platform-specific),理由:
范围检查 / Scope checks
功能矩阵 / Feature matrix
已在本插件仓库更新 docs/feature-matrix.md:记录 requires.ui: 0、ui.contribute 与 settings.view 在 macOS 的无头实机验证证据,Windows 与 Linux 原生验证保持 pending
[N/A] ./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh:本仓库为独立插件仓库,不修改宿主 shared/platform-feature-matrix/
没有提交 .artifacts/ 下生成的临时产物
插件归属 / Plugin ownership
所有插件代码、单元测试、端到端 overlay 测试、功能矩阵、翻译和截图资源均只在 lithe-plugin-java 仓库维护,Lithe-IDEA 与 Lithe-core-rust 零改动、对本插件零依赖
端到端视觉测试通过 go test -overlay 注入,不向宿主仓库写入任何文件
UI 验证 / UI evidence
已运行受影响场景的 Viva 无头测试,生成并检查对应本次实现的截图:
命令:node scripts/compiler/visual.mjs
Open Graph Description: 关联 Issue / Linked issue 无(对齐 lithe-plugin-go 的设置页 settingRegions[].view 实时画布预览,关联宿主 Lithe-IDEA #2183 / #2191) PR 类型 / Type feat:新功能或用户可见的改进 fix:缺陷修复 docs:文档、Agent Note、Skill 等规则文件 release:稳定...
X Description: 关联 Issue / Linked issue 无(对齐 lithe-plugin-go 的设置页 settingRegions[].view 实时画布预览,关联宿主 Lithe-IDEA #2183 / #2191) PR 类型 / Type feat:新功能或用户可见的改进 fix:缺陷修复 docs:文档、Agent Note、Skill 等规则文件 release:稳定...
Opengraph URL: https://github.com/Lithe-IDEA/lithe-plugin-java/pull/40
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b5c82428-e9df-2ec4-cbcd-f55ed8f1edce |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C940:2FADBA:8AB381:C4C0DA:6B0716DA |
| html-safe-nonce | bba6bf875537ec9112297c8e3c4bb077ca7d362e1c37c748b4910633244e7ce2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTQwOjJGQURCQTo4QUIzODE6QzRDMERBOjZCMDcxNkRBIiwidmlzaXRvcl9pZCI6Ijc2NjE1Mzc2Mjg0ODMxNjM4NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 04f80ffa19653322d13840e6ef5987905783086ae04a2749fbe1b6460d81d4dc |
| hovercard-subject-tag | pull_request:5391578720 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/Lithe-IDEA/lithe-plugin-java/pull/40/files |
| twitter:image | https://avatars.githubusercontent.com/u/159525154?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/159525154?s=400&v=4 |
| og:image:alt | 关联 Issue / Linked issue 无(对齐 lithe-plugin-go 的设置页 settingRegions[].view 实时画布预览,关联宿主 Lithe-IDEA #2183 / #2191) PR 类型 / Type feat:新功能或用户可见的改进 fix:缺陷修复 docs:文档、Agent Note、Skill 等规则文件 release:稳定... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9aaa1abe1aaef39a8543ab08df7a776c3243275815d741d29afa7b02148ca05e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/Lithe-IDEA/lithe-plugin-java git https://github.com/Lithe-IDEA/lithe-plugin-java.git |
| octolytics-dimension-user_id | 340144206 |
| octolytics-dimension-user_login | Lithe-IDEA |
| octolytics-dimension-repository_id | 1446370282 |
| octolytics-dimension-repository_nwo | Lithe-IDEA/lithe-plugin-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1446370282 |
| octolytics-dimension-repository_network_root_nwo | Lithe-IDEA/lithe-plugin-java |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c43783771de038e2c401dd343799000e8d1253 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width