Skip to content

Conversation

@hexaredecimal
Copy link
Collaborator

@hexaredecimal hexaredecimal commented Aug 13, 2025

I woke up to a code reset. I really do not know what happened. It seems last night when I was committing only 2 file got committed and they are not even part of the project. At the same time I lost all important code.

Summary by CodeRabbit

  • New Features

    • Added Dark/Light mode with consistent theming across the editor, canvas, and plugins.
    • Introduced Settings, Editor Settings, and General Settings dialogs for appearance and basic project/runtime options.
    • Enabled plugin discovery and loading from a plugins folder, integrating plugin panels into the UI.
  • Chores

    • Expanded ignore list for build artifacts.
    • Updated build configuration to support the new plugin system.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a ThemeManager for centralized theming, makes editors and canvas render using theme colors, enables runtime theme switching, implements dynamic plugin discovery/loading from ./etc/plugins/*.jar, introduces several Swing settings dialogs and forms, and adds a PiccodePlugin dependency plus a .gitignore entry for *.jar.

Changes

Cohort / File(s) Summary
Build & Config
pom.xml, .gitignore
Added dependency com.github.Glimmr-Lang:PiccodePlugin:main-SNAPSHOT. Added ignore pattern *.jar to .gitignore.
Theming Core & Integration
src/main/java/org/editor/theme/ThemeManager.java, src/main/java/org/editor/CanvasFrame.java, src/main/java/org/editor/CodeEditor.java, src/main/java/org/editor/EditorWindow.java
New ThemeManager centralizes theme state, color constants, and FlatLaf switching; CanvasFrame uses theme colors; CodeEditor gains public void setThemeMode(boolean); EditorWindow integrates ThemeManager, exposes desk and dark as public static, registers/removes editors and calls theme updates, and renames removeIfDirtyremoveIfNotDirty.
Plugins System
src/main/java/org/editor/panels/PluginsPanel.java
Implemented plugin discovery and loading from ./etc/plugins/*.jar via per-jar URLClassLoader, instantiates classes implementing PiccodePluginPanel, docks panels into EditorWindow, keeps loaders alive, and registers plugins with ThemeManager.
Settings UI (Forms + Panels)
src/main/java/org/editor/dialogs/EditorSettingsDialog.form, src/main/java/org/editor/dialogs/EditorSettingsDialog.java, src/main/java/org/editor/dialogs/GeneralSettingsDialog.form, src/main/java/org/editor/dialogs/GeneralSettingsDialog.java, src/main/java/org/editor/dialogs/SettingsDialog.form, src/main/java/org/editor/dialogs/SettingsDialog.java
Added NetBeans .form resources and matching Swing JPanel classes for EditorSettingsDialog, GeneralSettingsDialog, and SettingsDialog. These are UI definitions with no runtime behavior changes.

Sequence Diagram(s)

sequenceDiagram
  participant App as Application
  participant EW as EditorWindow
  participant TM as ThemeManager
  participant CE as CodeEditor*
  participant PP as Plugin*

  App->>EW: start(dark=true)
  EW->>TM: setFlatLaf(dark)
  EW->>TM: updateThemes(dark)
  TM->>CE: setThemeMode(dark) (broadcast)
  TM->>PP: setThemeMode(dark) (broadcast)
Loading
sequenceDiagram
  participant PPnl as PluginsPanel
  participant FS as FileSystem
  participant L as URLClassLoader
  participant Cls as CandidateClass
  participant TM as ThemeManager
  participant EW as EditorWindow

  PPnl->>FS: list ./etc/plugins/*.jar
  loop each jar
    PPnl->>L: create loader(jar, parent=system)
    PPnl->>L: enumerate classes
    loop each class
      PPnl->>Cls: try load class
      alt implements PiccodePluginPanel
        PPnl->>Cls: instantiate + init
        PPnl->>TM: registerPlugin(plugin)
        PPnl->>EW: dock plugin panel
        PPnl->>TM: updateThemes(EditorWindow.dark)
      end
    end
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

I hop through jars and theme the night,
I swap the shades from dark to bright.
New panels bloom, plugins find their den,
I dock, I render — carrot-powered zen.
Tiny paws, big code — I ship it then. 🥕


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 68d922a and 4d21eee.

📒 Files selected for processing (13)
  • .gitignore (1 hunks)
  • pom.xml (1 hunks)
  • src/main/java/org/editor/CanvasFrame.java (4 hunks)
  • src/main/java/org/editor/CodeEditor.java (2 hunks)
  • src/main/java/org/editor/EditorWindow.java (10 hunks)
  • src/main/java/org/editor/dialogs/EditorSettingsDialog.form (1 hunks)
  • src/main/java/org/editor/dialogs/EditorSettingsDialog.java (1 hunks)
  • src/main/java/org/editor/dialogs/GeneralSettingsDialog.form (1 hunks)
  • src/main/java/org/editor/dialogs/GeneralSettingsDialog.java (1 hunks)
  • src/main/java/org/editor/dialogs/SettingsDialog.form (1 hunks)
  • src/main/java/org/editor/dialogs/SettingsDialog.java (1 hunks)
  • src/main/java/org/editor/panels/PluginsPanel.java (1 hunks)
  • src/main/java/org/editor/theme/ThemeManager.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Sibusiso

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@hexaredecimal hexaredecimal merged commit 14c8f5f into main Aug 13, 2025
1 check passed
hexaredecimal added a commit that referenced this pull request Aug 13, 2025
Merge pull request #41 from Glimmr-Lang/Sibusiso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants