Skip to content

feat: add plain-text script editor with FmScript object model#145

Merged
fuzzzerd merged 29 commits intomasterfrom
fuzzz/script-editor
Apr 2, 2026
Merged

feat: add plain-text script editor with FmScript object model#145
fuzzzerd merged 29 commits intomasterfrom
fuzzz/script-editor

Conversation

@fuzzzerd
Copy link
Copy Markdown
Owner

@fuzzzerd fuzzzerd commented Mar 31, 2026

Summary

  • Script tab as primary editor for script clips, XML only for persistence/clipboard
  • Typed FmScript object model with validation, autocomplete, and syntax highlighting
  • Strategy-pattern step handlers, extensible for new step types
  • Repo restructured to src/tests layout with SharpFM.Scripting namespace
  • IClipboardService/IFolderService DI, status bar, keyboard shortcuts
  • 93 tests

Test plan

  • dotnet test — 93/93
  • Edit script inline, save produces valid XML, copy to FM clipboard works
  • Intellisense, validation squiggles, and keyboard shortcuts functional

fuzzzerd added 29 commits March 29, 2026 23:15
…onversion

Add a Script tab to the clip editor that renders FileMaker clipboard XML
as human-readable script syntax and converts edits back to valid XML.
This enables authoring scripts without touching raw XML.

Core converter (ported from agentic-fm, Apache 2.0):
- Step catalog with all 206 FM script steps loaded from embedded JSON
- Generic renderer handles any step via catalog metadata
- Specialized renderers for Set Variable, Set Field, Perform Script,
  Go to Layout, Go to Record, Show Custom Dialog, and control flow
- Multi-line calculation support with bracket-aware line merging
- Pretty-printed XML output on HR-to-XML conversion

Editor features:
- Custom TextMate grammar for FM script syntax highlighting
- Autocomplete for step names, param labels, and valid enum/boolean values
- Validation with squiggly underlines (unknown steps, invalid values,
  unmatched block pairs) and hover tooltips
- Bracket matching for [ ] pairs
- Multi-line statement background highlighting
- Tab-switch sync between XML and Script views

Test suite: 86 xUnit tests covering catalog loading, line parsing,
XML-to-HR, HR-to-XML, round-trips, validation, and completions.
…M.Scripting namespace

Restructure repository to standard src/tests layout. Reorganize the
scripting subsystem from Core/ScriptConverter into SharpFM.Scripting
with Model, Catalog, Handlers, Parsing, Validation, and Editor
sub-namespaces. Update CI workflows, VS Code configs, and project
references for new paths.
@fuzzzerd fuzzzerd merged commit 4e8b985 into master Apr 2, 2026
6 checks passed
@fuzzzerd fuzzzerd deleted the fuzzz/script-editor branch April 2, 2026 01:45
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.

1 participant