Proposal: integrate OmegaEdit with Apache Daffodil VS Code at the extension level #1481
scholarsmate
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Proposal
I propose that Apache Daffodil VS Code integrate OmegaEdit at the VS Code extension level instead of carrying a library-level/editor-UI integration inside
apache/daffodil-vscode.The short version:
extensionDependenciesentry and activating the typed API exported byctc-oss.omega-edit-data-editor.This would replace the current model where Daffodil depends directly on
@omega-edit/clientand@omega-edit/server, ownssrc/dataEditor, bundles its own Svelte Data Editor UI, and manages the OmegaEdit server lifecycle itself.Why change the boundary?
The current Daffodil integration works, but it couples three things that are easier to evolve separately:
Moving the integration up to the VS Code extension boundary gives each project a clearer job.
OmegaEdit can ship and test its editor as a reusable extension. Daffodil can treat the editor as another VS Code capability, similar to how extensions commonly compose with language tools, debuggers, and custom editors. The Daffodil repo no longer needs to carry a forked editor UI or keep low-level OmegaEdit client/server wiring in sync with OmegaEdit releases.
What the OmegaEdit extension already provides
The OmegaEdit Data Editor extension currently provides a VS Code custom editor backed by OmegaEdit, with:
Feature screenshots from the current OmegaEdit VS Code extension are being added to the extension README in #1482.
Editor overview
Search and replace with synchronized hex/text highlighting
External highlights for parser/debugger integrations
Transform plugins with inspectable content sources
Proposed Daffodil consumption model
Daffodil would declare the OmegaEdit extension dependency:
{ "extensionDependencies": ["ctc-oss.omega-edit-data-editor"] }Then Daffodil would activate the extension and call the versioned API:
The important part is that Daffodil would interact with a VS Code extension API, not the OmegaEdit server/client internals or the editor webview implementation.
Mapping from the current Daffodil behavior
Current Daffodil behavior maps cleanly onto the extension-level API:
openDataEditoron debug start opens the configureddatafile throughomegaEdit.open(uri, { offset }).daffodil.dataevents carryingbytePos1bbecome zero-based byte highlights throughomegaEdit.setExternalHighlights({ reveal: true, ... }).omegaEdit.clearExternalHighlights(uri).There is already an Apache-side proof of this direction in apache/daffodil-vscode#1726, which replaces the embedded editor path with
extensionDependenciesplus activation/API calls.Benefits
Risks and tradeoffs
ctc-oss.omega-edit-data-editor.Proposed next steps
ctc-oss.omega-edit-data-editor.openDataEditorenabled and verify:Ask
Does this extension-level dependency boundary look like the right long-term shape for the Apache Daffodil VS Code integration?
In particular, feedback would be helpful on:
openplus external-highlight API covers the debugger handoff cleanlyAll reactions