-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Goal
Rebuild the 4D editor on top of a modern, flexible, and extensible framework that supports a user experience similar to contemporary editors. The goal is to provide a familiar environment for developers already comfortable with modern tooling while unlocking advanced capabilities such as integrated AI copilots.
Motivation
Developers expect fast, intuitive, and customizable editing environments. The current editor creates friction for both new and experienced users. Moving to a modern foundation allows 4D to align with the ergonomics of widely used editors while providing a platform that supports innovation and AI assisted development.
Objectives
-
New Editor Core
Build the editor using a contemporary component based engine with full support for 4D syntax, autocomplete, navigation, search, and debugging. -
Familiar User Experience
Provide workflows and layout patterns that feel natural to users familiar with modern editors. This includes command palette, multi tab interfaces, split views, quick navigation, and global search. -
AI Copilot Enablement
Integrate AI assisted coding features such as inline completions, contextual refactoring suggestions, and an embedded chat panel. The AI should understand 4D specific structures including methods, forms, tables, fields, and relationships. -
Customization and Extensions
Allow themes, keybinding presets, settings, and extension points so users can configure their environment. Support custom internal plugins for domain specific tools. -
Performance and Reliability
Improve start up time, resource usage, and responsiveness. Ensure backward compatibility for teams transitioning from the legacy editor.
Deliverables
- A modern editor capable of opening and editing 4D project assets
- Language services for syntax understanding and refactoring
- AI copilot integration
- Migration documentation for existing users
- Performance and telemetry reports
Acceptance Criteria
- Developers can fully edit and navigate 4D projects using the new editor
- The editor feels natural for users familiar with modern tools
- AI assistance works reliably and improves productivity
- Testers report major usability and workflow improvements
Long Term Vision
The new editor becomes the foundation for future 4D development workflows. It supports rapid innovation, better ecosystem integration, and new capabilities that make 4D more competitive and enjoyable for modern developers.
Limitations of Using Code OSS for a Custom 4D IDE
Below is a detailed overview of the structural limitations that make Code OSS a difficult base for a fully customized IDE.
1. Architecture Not Designed for Reshaping
Code OSS is the core of VS Code. It is built to serve a single product. Deep changes are difficult. Custom layouts, new panels, or editor behaviors often require forking, which creates long term maintenance problems.
2. Extension Host Restrictions
Extensions run in a sandbox with limited access. Complex domain specific tools like schema editors, data browsers, and form designers cannot integrate deeply without workarounds.
3. No Access to Proprietary Extensions
Code OSS cannot use:
- GitHub Copilot
- Microsoft Git extension
- Remote Development extensions
These cannot be bundled for legal reasons.
AI copilots must be reimplemented from scratch.
4. High Cost of Fork Maintenance
If customization requires modifying Code OSS internals, every upstream update becomes a merge effort. This is risky and costly over time.
5. Poor Fit for Virtual or Structured Project Types
Code OSS assumes a traditional file system. 4D projects contain virtual resources such as methods, forms, structure files, and runtime assets that do not map cleanly to a disk model.
6. Sandbox Limitations for Debugging
VS Code isolates the debugger using the Debug Adapter Protocol. Integrating a custom 4D debugger requires complex bridging and still hits sandbox limits.
7. UI Boundaries
Complex UI must live in Webviews. Webviews isolate code, have slower performance, and cannot behave like native IDE panels.
8. Performance Considerations
Heavy virtual file systems, custom navigation models, or integrated domain tools can introduce latency. Tuning performance inside the Code OSS architecture becomes a long effort.
9. Upstream Instability
Microsoft frequently changes internal APIs and architecture. Forks break. Long term maintenance becomes unpredictable.
Why Theia Fits the 4D Modernization Strategy Better
Below is the conceptual contrast that highlights why Theia aligns more naturally with 4D Studio goals.
1. Built for Custom IDEs
Theia is designed as a framework for building domain specific IDEs. It does not assume your product is VS Code. Every part is modular and replaceable.
2. Deep Customization Without Forking
Theia allows:
- custom layout
- custom panels
- custom commands
- custom editors
- custom services
All without modifying the core.
3. Flexible Extension Model
Theia plugins can run inside the backend and frontend of the IDE. This bypasses sandbox limits and allows tight integration with the 4D runtime, database engine, debugger, and schema system.
4. Native Support for Complex UI
Widgets and panels can be written directly in the Theia workbench, not inside isolated Webviews. This is ideal for GUI driven tools like forms, data explorers, query editors, and visual designers.
5. Virtual File System Ready
Theia supports custom file system providers as a first class feature. 4D can map methods, forms, structures, and metadata into a virtual file tree that behaves naturally inside the editor.
6. AI Copilot Freedom
Theia allows completely custom AI integration. You can implement:
- inline AI completions
- AI driven refactoring
- contextual chat
- 4D aware code generation
No licensing issues. No dependence on GitHub or Microsoft.
7. Stable API for Long Term Support
Theia is maintained with stability in mind because it is used by companies like IBM, SAP, Arm, and Arduino for internal IDE products. This provides consistent API guarantees and less churn.
8. Designed for Embedding
Theia is meant to be part of a larger product. It fits naturally into a customized IDE like the one 4D Studio requires.
Decision Matrix: Code OSS vs Theia
| Criteria | Code OSS | Theia |
|---|---|---|
| Core Philosophy | Finished product not intended for reshaping | Framework for building custom IDEs |
| Modularity | Limited | Fully modular |
| Customization Depth | Requires forking for deep changes | Full customization without forking |
| Extension Model | Sandboxed and restricted | Backend and frontend plugins |
| Debugger Integration | Requires complex bridging | Can integrate deeply in the backend |
| UI Panels | Must be Webviews | Native widgets |
| Handling Virtual Files | Limited support | Native support |
| AI Copilot Integration | Must build from scratch inside a sandbox | Full freedom with backend integration |
| Ecosystem Access | Large, but missing Microsoft extensions | Compatible with many VS Code extensions |
| Maintenance Over Time | High cost due to upstream churn | APIs designed for stability |
| Long Term Fit | Better for general text editors | Better for domain specific IDEs |
| Embedding in a Product | Difficult | Designed for embedding |
| Strategic Alignment | Forces the product toward a VS Code identity | Allows 4D to define its own identity |
Strategic Interpretation
The question is not which editor is better. The question is which editor is better for building a unique IDE that supports 4D domain specific workflows.
Code OSS is powerful but rigid. It works best when the goal is to create something very close to VS Code. The moment the product must include multi layer domain workflows such as schemas, forms, structured metadata, live debugger integration, and AI context mapping, the architecture becomes restrictive.
Theia is engineered for exactly this scenario. It is a modern foundation that can look and feel like VS Code while giving full freedom to build deep internal tools that integrate with the 4D runtime and data model.
Theia allows 4D to deliver a modern and familiar experience while preserving the flexibility to innovate and evolve the IDE over time.