feat(editor): type-token coloring + analyzer diagnostics
The text tab now colours `type: text|json|bytes|file|number`
values in the same hues the graph canvas uses for the wire of
that type — a glance at the YAML confirms what a glance at the
graph shows. Promoted the wire-colour palette to a single
source of truth in `wire_colors.dart` so the graph, the
properties panel and the text tab can't drift.
Adds `FlowAnalyzer` (extends `AbstractAnalyzer`) so the gutter
shows error pins and broken lines get wavy red underlines for:
- YAML parse errors (source-span pinned to the offending line)
- `use:` referencing a capability the operator hasn't installed
(bare provider/name match — `text.echo@^1` and `text.echo`
compare equal)
Editor host passes a closure into `setAvailableCapabilities` so
the analyser always sees the current installed list without
re-creating the controller on every Studio rebuild. Bumps the
package version to 0.15.0.
Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
73736769a0
commit
885d2db4e1
8 changed files with 400 additions and 52 deletions
|
|
@ -100,6 +100,9 @@ class _FlowEditorPageState extends State<FlowEditorPage>
|
|||
super.initState();
|
||||
_l = FlowEditorStrings(widget.locale);
|
||||
_controller = FlowEditorController();
|
||||
_controller.codeController.setAvailableCapabilities(
|
||||
() => widget.availableCapabilities,
|
||||
);
|
||||
_controller.addListener(_onCtrlChanged);
|
||||
_tabs = TabController(length: 3, vsync: this);
|
||||
_files = _listFiles();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue