Skip to content

feat(core): Add PropertiesDialog #2097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 2, 2025
Merged

feat(core): Add PropertiesDialog #2097

merged 3 commits into from
May 2, 2025

Conversation

unknowIfGuestInDream
Copy link
Owner

@unknowIfGuestInDream unknowIfGuestInDream commented Apr 20, 2025

Sweep Summary Sweep

Added a new PropertiesDialog component to display system properties in a tabbed interface and integrated it into the help menu of both SMC and QE modules.

  • Created new PropertiesDialog.java class that displays system properties in a tabbed interface with a JVM tab.
  • Added openPropertiesDialog() methods to FxAction.java to provide standardized access to the new dialog.
  • Integrated the properties dialog into the help menu of both SMC and QE modules by adding it to their respective menu configuration providers.

Ask Sweep AI questions about this PR

Close #2071

Fixes #

Proposed Changes

  1. ...
  2. ...
  3. ...

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as either enhancement, bug, documentation or dependencies
  • Verify design and implementation

Summary by CodeRabbit

  • 新功能
    • 新增“系统属性”对话框,可通过菜单栏的帮助菜单访问,支持查看JVM及系统环境变量等详细信息。
    • 菜单栏帮助菜单新增“系统属性”项,方便用户快速打开系统属性窗口。
    • 新增信息展示组件,优化系统属性文本的高亮显示与样式。

Copy link

Thank you for following naming conventions! 😻

Copy link

vercel bot commented Apr 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
javafx-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2025 1:22pm

Copy link

sourcery-ai bot commented Apr 20, 2025

Reviewer's Guide by Sourcery

This pull request introduces a new PropertiesDialog to display system properties, accessible via a new action added to the help menus of QE and SMC. The dialog displays the project license content in a non-editable text area.

Sequence diagram for opening the PropertiesDialog

sequenceDiagram
    participant User
    participant QeMenubarConfigrationProvider
    participant FxAction
    participant PropertiesDialog

    User->>QeMenubarConfigrationProvider: Clicks 'Open Properties Dialog'
    QeMenubarConfigrationProvider->>FxAction: openPropertiesDialog()
    FxAction->>PropertiesDialog: openPropertiesDialog()
    PropertiesDialog->>PropertiesDialog: Creates and displays dialog
    PropertiesDialog-->>User: Shows the properties dialog
Loading

File-Level Changes

Change Details Files
Introduced a new PropertiesDialog to display system properties.
  • Created a PropertiesDialog class with a static method openPropertiesDialog to display the dialog.
  • The dialog contains a TabPane with a tab for JVM properties.
  • The JVM tab displays the project license content in a non-editable InlineCssTextArea.
  • The dialog uses FxDialog for its structure and includes a close button.
core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java
Added actions to open the PropertiesDialog via FxAction.
  • Added openPropertiesDialog() methods to FxAction to create actions that open the dialog.
  • These methods create actions with a default text and handler, and also allow specifying a custom text and handler.
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java
Integrated the openPropertiesDialog action into the menubar configurations for QE and SMC.
  • Added the openPropertiesDialog action to the help menu in QeMenubarConfigrationProvider.
  • Added the openPropertiesDialog action to the help menu in SmcMenubarConfigrationProvider.
qe/src/main/java/com/tlcsdm/qe/provider/QeMenubarConfigrationProvider.java
smc/src/main/java/com/tlcsdm/smc/provider/SmcMenubarConfigrationProvider.java

Assessment against linked issues

Issue Objective Addressed Explanation
#2071 Implement a window to view system variables.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

quine-bot bot commented Apr 20, 2025

👋 Figuring out if a PR is useful is hard, hopefully this will help.

  • @unknowIfGuestInDream has been on GitHub since 2019 and in that time has had 1210 public PRs merged
  • Don't you recognize them? They've been here before 🎉
  • Here's a good example of their work: javafxTool (Javafx scaffolding, built on JDK17 + JavaFX21 + controlsfx 11.x.x + Maven)
  • From looking at their profile, they seem to be good with Java and HTML.

Their most recently public accepted PR is: #2095

Copy link

coderabbitai bot commented Apr 20, 2025

"""

Walkthrough

本次变更在应用程序中引入了“系统属性”窗口的功能。主要包括:新增PropertiesDialog类用于显示带有JVM信息、环境变量等系统属性的对话框,FxAction类增加了两个静态方法用于创建打开该对话框的动作,并在QeMenubarConfigrationProviderSmcMenubarConfigrationProvider中将此动作集成到帮助菜单项中。新增了InformationArea类用于带样式的文本显示,调整了PropertiesArea的文本解析逻辑,更新了模块依赖和本地化资源,新增了相关CSS样式文件以支持文本高亮显示。

Changes

文件/路径分组 变更摘要
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java 新增两个静态方法openPropertiesDialog(),用于创建和打开系统属性对话框的动作。
core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java 新增PropertiesDialog类及其静态方法openPropertiesDialog(),用于显示包含JVM信息、环境变量等的系统属性对话框。
qe/src/main/java/com/tlcsdm/qe/provider/QeMenubarConfigrationProvider.java
smc/src/main/java/com/tlcsdm/smc/provider/SmcMenubarConfigrationProvider.java
在帮助菜单项中新增openPropertiesDialog动作,用于打开系统属性窗口。
core/src/main/java/com/tlcsdm/core/javafx/richtext/InformationArea.java 新增InformationArea类,继承自CodeArea,实现带样式的键值对文本高亮显示。
core/src/main/java/com/tlcsdm/core/javafx/richtext/PropertiesArea.java 修改computeHighlighting方法,调整文本按首个=字符分割逻辑。
core/src/main/java/module-info.java 新增模块依赖java.management
core/src/main/resources/com/tlcsdm/core/i18n/messages_*.properties 新增多语言系统属性菜单项和帮助菜单文本资源。
core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/information.css 新增信息文本高亮样式CSS文件。
core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/properties.css 修改全局文本背景色为灰色。

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Menubar
    participant FxAction
    participant PropertiesDialog

    User->>Menubar: 点击“查看系统属性”菜单项
    Menubar->>FxAction: 调用openPropertiesDialog()
    FxAction->>PropertiesDialog: 调用openPropertiesDialog()
    PropertiesDialog->>User: 显示系统属性对话框
Loading

Assessment against linked issues

Objective Addressed Explanation
实现显示系统环境变量和属性的窗口(#2071 对话框包含系统环境变量和JVM等详细信息。
窗口应全面展示系统变量,包括Java运行信息、操作系统详情、环境变量和应用特定属性(#2071 显示了JVM信息和环境变量,但未明确包含操作系统详细信息和应用特定属性。
功能应集成于现有平台菜单(Eclipse-based, QE Lighting RCP等)(#2071 已在QE和SMC帮助菜单中集成入口动作。

Poem

小兔敲键欢声笑,
新窗弹出属性表。
JVM信息一览全,
环境变量细细瞧。
菜单点开不迷路,
代码润色更美妙。
🐇✨
"""

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mergify mergify bot added the enhancement New feature or request label Apr 20, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @unknowIfGuestInDream - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider using a more descriptive name than openPropertiesDialog for the FxAction.
  • The PropertiesDialog could be made more generic by accepting a Properties object to display.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (4)
core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java (3)

39-42: 类注释的准确性可以提高

类注释"Property弹窗"与实际功能相比过于简单。建议扩展注释来更准确地描述该对话框的用途和功能,例如"系统属性查看对话框,用于展示JVM相关信息"。


60-61: 考虑添加更多系统信息标签

当前对话框只包含一个"JVM"标签。考虑添加更多有用的系统信息标签,如"操作系统"、"环境变量"或"应用程序"等,以提供更完整的系统属性视图。


68-70: 本地化对话框标题

对话框标题"Property"是硬编码的,建议使用I18nUtils进行国际化处理,以支持多语言环境。

-FxDialog<VBox> dialog = new FxDialog<VBox>().setTitle("Property").setOwner(FxApp.primaryStage)
+FxDialog<VBox> dialog = new FxDialog<VBox>().setTitle(I18nUtils.get("core.dialog.properties.title")).setOwner(FxApp.primaryStage)
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java (1)

407-409: 方法注释应该更详细

方法注释"查看系统属性"比较简单,建议扩展注释以包含更多关于此方法功能的信息,例如说明它创建一个操作用于打开系统属性对话框,显示JVM相关信息等。

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f793a47 and 1fb47d0.

📒 Files selected for processing (4)
  • core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java (2 hunks)
  • core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java (1 hunks)
  • qe/src/main/java/com/tlcsdm/qe/provider/QeMenubarConfigrationProvider.java (2 hunks)
  • smc/src/main/java/com/tlcsdm/smc/provider/SmcMenubarConfigrationProvider.java (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
smc/src/main/java/com/tlcsdm/smc/provider/SmcMenubarConfigrationProvider.java (2)
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java (1)
  • FxAction (70-627)
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxActionGroup.java (1)
  • FxActionGroup (43-111)
qe/src/main/java/com/tlcsdm/qe/provider/QeMenubarConfigrationProvider.java (2)
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java (1)
  • FxAction (70-627)
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxActionGroup.java (1)
  • FxActionGroup (43-111)
core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java (2)
core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java (1)
  • PropertiesDialog (43-75)
cg/src/main/java/com/tlcsdm/cg/util/I18nUtils.java (1)
  • I18nUtils (39-58)
core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java (3)
core/src/main/java/com/tlcsdm/core/javafx/FxApp.java (1)
  • FxApp (41-102)
core/src/main/java/com/tlcsdm/core/util/CoreConstant.java (1)
  • CoreConstant (39-108)
core/src/main/java/com/tlcsdm/core/javafx/dialog/FxButtonType.java (1)
  • FxButtonType (37-56)
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: build (17, macos-latest, false)
  • GitHub Check: build (17, windows-latest, false)
  • GitHub Check: build (21, ubuntu-latest, false)
  • GitHub Check: build (21, windows-latest, false)
  • GitHub Check: build (21, macos-latest, false)
  • GitHub Check: build (17, ubuntu-latest, false)
  • GitHub Check: qodana
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: Summary
🔇 Additional comments (4)
qe/src/main/java/com/tlcsdm/qe/provider/QeMenubarConfigrationProvider.java (2)

109-109: 新增系统属性查看功能

成功添加了系统属性查看功能的菜单项,集成在帮助菜单中的适当位置。


195-196: 菜单项位置适当

将系统属性对话框菜单项放置在openUserData和第一个ACTION_SEPARATOR之间的位置合理,保持了菜单结构的一致性。

smc/src/main/java/com/tlcsdm/smc/provider/SmcMenubarConfigrationProvider.java (2)

109-109: 新增系统属性查看功能

成功添加了系统属性查看功能的菜单项,集成在帮助菜单中的适当位置。


194-195: 菜单项位置适当

将系统属性对话框菜单项放置在openUserData和第一个ACTION_SEPARATOR之间的位置合理,保持了菜单结构的一致性,且与QeMenubarConfigrationProvider中的实现保持了一致。

Copy link
Contributor

github-actions bot commented Apr 20, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Contributor

mergify bot commented Apr 21, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

3 similar comments
Copy link
Contributor

mergify bot commented Apr 22, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

Copy link
Contributor

mergify bot commented Apr 23, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

Copy link
Contributor

mergify bot commented Apr 24, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

Copy link
Contributor

mergify bot commented Apr 28, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

3 similar comments
Copy link
Contributor

mergify bot commented Apr 29, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

Copy link
Contributor

mergify bot commented Apr 30, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

Copy link
Contributor

mergify bot commented May 1, 2025

@unknowIfGuestInDream
The current code is frozen, please wait for the unfreeze to merge.

Copy link
Contributor

github-actions bot commented May 2, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Close #2071

Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
core/src/main/java/com/tlcsdm/core/javafx/richtext/PropertiesArea.java (1)

59-72: 🛠️ Refactor suggestion

建议与InformationArea保持一致的边缘情况处理

computeHighlighting方法与新添加的InformationArea类中的同名方法有类似的实现逻辑,但缺少对空文本和未包含等号行的完整处理。建议参考前面对InformationArea的修改建议,同样增强此方法的健壮性。

建议统一两个类对边缘情况的处理方式,保持代码风格的一致性:

private StyleSpans<Collection<String>> computeHighlighting(String text) {
+    if (CharSequenceUtil.isEmpty(text)) {
+        return StyleSpans.singleton(Collections.emptyList(), 0);
+    }
    List<String> list = StrUtil.split(text, "\n");
    StyleSpansBuilder<Collection<String>> spansBuilder = new StyleSpansBuilder<>();
+    int processedLength = 0;
    for (String str : list) {
        List<String> l = CharSequenceUtil.split(str, '=', 2);
        if (l.size() != 2) {
+            spansBuilder.add(Collections.emptyList(), str.length() + 1);
+            processedLength += str.length() + 1;
            continue;
        }
        spansBuilder.add(Collections.singleton("propertyKey"), l.get(0).length());
        spansBuilder.add(Collections.singleton("propertyEqu"), 1);
        spansBuilder.add(Collections.emptyList(), l.get(1).length() + 1);
+        processedLength += str.length() + 1;
    }
+    // 确保处理了所有文本
+    if (processedLength < text.length()) {
+        spansBuilder.add(Collections.emptyList(), text.length() - processedLength);
+    }
    return spansBuilder.create();
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12a7f2f and 8cc088e.

⛔ Files ignored due to path filters (1)
  • core/src/main/resources/com/tlcsdm/core/static/menubar/properties.png is excluded by !**/*.png
📒 Files selected for processing (10)
  • core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java (2 hunks)
  • core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java (1 hunks)
  • core/src/main/java/com/tlcsdm/core/javafx/richtext/InformationArea.java (1 hunks)
  • core/src/main/java/com/tlcsdm/core/javafx/richtext/PropertiesArea.java (1 hunks)
  • core/src/main/java/module-info.java (1 hunks)
  • core/src/main/resources/com/tlcsdm/core/i18n/messages_en.properties (2 hunks)
  • core/src/main/resources/com/tlcsdm/core/i18n/messages_ja.properties (2 hunks)
  • core/src/main/resources/com/tlcsdm/core/i18n/messages_zh.properties (2 hunks)
  • core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/information.css (1 hunks)
  • core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/properties.css (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • core/src/main/java/module-info.java
  • core/src/main/resources/com/tlcsdm/core/i18n/messages_zh.properties
  • core/src/main/resources/com/tlcsdm/core/i18n/messages_ja.properties
  • core/src/main/resources/com/tlcsdm/core/i18n/messages_en.properties
🚧 Files skipped from review as they are similar to previous changes (2)
  • core/src/main/java/com/tlcsdm/core/javafx/controlsfx/FxAction.java
  • core/src/main/java/com/tlcsdm/core/javafx/dialog/PropertiesDialog.java
🧰 Additional context used
🪛 Biome (1.9.4)
core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/information.css

[error] 29-29: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 33-33: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 34-34: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 38-38: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/properties.css

[error] 29-29: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: build (21, ubuntu-latest, false)
  • GitHub Check: check_bad_merge
  • GitHub Check: build (17, windows-latest, false)
  • GitHub Check: build (21, windows-latest, false)
  • GitHub Check: build (21, macos-latest, false)
  • GitHub Check: build (17, ubuntu-latest, false)
  • GitHub Check: build (17, macos-latest, false)
  • GitHub Check: qodana
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: Summary
🔇 Additional comments (6)
core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/information.css (3)

28-30: 样式定义清晰明了

为所有元素设置白色文本背景色,这与新的InformationArea组件的设计风格相符。

🧰 Tools
🪛 Biome (1.9.4)

[error] 29-29: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


32-35: 键名样式定义适当

为信息键名(.infoKey)设置黑色粗体样式,使键名在视觉上更加突出,有助于提高信息的可读性。

🧰 Tools
🪛 Biome (1.9.4)

[error] 33-33: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 34-34: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


37-39: 等号样式设计合理

为等号分隔符(.infoEqu)使用深灰色(#323338),与键名形成适当的视觉对比,同时保持整体界面的和谐性。

🧰 Tools
🪛 Biome (1.9.4)

[error] 38-38: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

core/src/main/java/com/tlcsdm/core/javafx/richtext/InformationArea.java (1)

46-54: 构造函数实现良好

构造函数设置了合适的样式类并加载了相应的CSS资源,同时使用Objects.requireNonNull进行了空检查,避免了潜在的NullPointerException。监听文本属性的变化并实时更新高亮样式的方法也很合理。

core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/properties.css (1)

29-29: 背景色改变需考虑与InformationArea的视觉一致性

背景色从白色改为灰色可能会影响文本的可读性,并与新添加的InformationArea组件(使用白色背景)形成视觉上的不一致。建议确认这种对比是否为有意设计。

请确认这种背景色的差异是否符合整体UI设计理念,以及是否会影响用户体验。特别是当系统同时显示PropertiesAreaInformationArea时,不同的背景色是否会导致界面视觉上的不协调。

🧰 Tools
🪛 Biome (1.9.4)

[error] 29-29: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

core/src/main/java/com/tlcsdm/core/javafx/richtext/PropertiesArea.java (1)

63-63: 拆分逻辑优化得当

将拆分限制为最多2个部分(通过添加limit参数)是一个很好的改进。这样可以正确处理属性值中包含等号的情况,避免了过度拆分导致的样式应用错误。

Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Copy link

sonarqubecloud bot commented May 2, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
6.9% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8cc088e and 103ee5d.

📒 Files selected for processing (2)
  • core/src/main/java/module-info.java (1 hunks)
  • core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/information.css (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • core/src/main/java/module-info.java
🧰 Additional context used
🪛 Biome (1.9.4)
core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/information.css

[error] 29-29: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 33-33: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 34-34: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 38-38: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: build (21, windows-latest, false)
  • GitHub Check: build (21, macos-latest, false)
  • GitHub Check: build (17, ubuntu-latest, false)
  • GitHub Check: build (17, windows-latest, false)
  • GitHub Check: build (21, ubuntu-latest, false)
  • GitHub Check: build (17, macos-latest, false)
  • GitHub Check: qodana
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: Summary
🔇 Additional comments (3)
core/src/main/resources/com/tlcsdm/core/static/javafx/richtext/information.css (3)

1-26: BSD 许可头完整且符合规范
文件包含完整的 BSD 许可证头,版权归属和免责声明描述清晰。


32-35: JavaFX CSS 属性合法,无需更改
-fx-fill-fx-font-weight 是 JavaFX CSS 的标准属性,用于设置文本颜色和字体粗细。可忽略静态分析工具对 noUnknownProperty 的误报。

🧰 Tools
🪛 Biome (1.9.4)

[error] 33-33: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 34-34: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


37-39: JavaFX CSS 属性合法,无需更改
.infoEqu 中的 -fx-fill 用于设置等号部分的颜色,符合预期,可以保留。

🧰 Tools
🪛 Biome (1.9.4)

[error] 38-38: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

@unknowIfGuestInDream unknowIfGuestInDream merged commit 4e53757 into master May 2, 2025
33 checks passed
@unknowIfGuestInDream unknowIfGuestInDream deleted the prop branch May 2, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] 查看系统变量窗口
1 participant