How zev-g/jfxide works
Project Type and Purpose
• JFxIDE is a standalone desktop application (an IDE) written in Java.
• It provides a code‐editor (built on RichTextFX and JavaFX), syntax highlighting, intelligent autocomplete, tooltips, file‐tree navigation, an addon/plugin system, and customizable themes/settings stored in JSON (via GSON).
High‐Level Components
a. UI Layer (JavaFX)
• Main Application Window (Main.java, FakeMain.java)
• Editor Pane (RichTextFX integration under tmw.me.com.ide.codeEditor & draganddrop)
• File Tree View (tmw.me.com.ide.fileTreeView)
• Console/Command Panel (betterfx package)
• Panels & Popups (notifications, settings, tooltips, minimap)
b. Core Logic
• IDE Core & Plugin Manager (AddonBase, Ide.java, IdeSpecialParser)
• Language Subsystem
– Syntax Manager & SyntaxPiece factories
– Parser (language.interpretation.parse.Parser)
– Interpreter/Runtime (language.interpretation.run)
– Built-in language addons (JavaFXAddon, SkriptLanguage, etc.)
c. Data & Configuration
• Settings & Themes (JSON files managed by GSON under resources/ide/settings & resources/ide/styles)
• Language definitions and styles (resources/ide/editor/languages & styles)
d. Utility Libraries
• jfxhelper (CSS/Node utilities)
• javaPlayground (in-memory compile/evaluate engine)
Relationships and Data Flows
• User interacts with JavaFX UI → UI controllers forward events to:
• Editor component → passes text to SyntaxHighlighter → invokes SyntaxManager & Parser → updates editor styling
• Autocomplete engine (ExpressionVisual, ConsoleEvent) → displays suggestions
• FileTreeView → loads/saves files from local filesystem
• Console → sends commands to javaPlayground or language interpreter
• Plugin system (AddonBase) loads JSON addon descriptors → extends language features or UI elements
• Settings subsystem reads/writes JSON → propagates theme/style changes to UI
Key Architectural Patterns
• Modular monolith separated into UI, core logic, data/config, utilities.
• Plugin architecture: AddonBase + JSON‐driven discovery.
• MVC‐like for the editor (Model: document + syntax tree; View: RichTextFX pane; Controller: codeEditor classes).
• Factory pattern in syntaxPiece and highlighting.
• Observer/event schedulers for UI updates and concurrency.