You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 95b4e57
Browse filesBrowse the repository at this point in the historyBrowse files
The plan kept saying "drop" about the application shell without saying
where it goes instead, which reads as though Fiji loses its menus. It
does not: the problem with SciJava Common was never that it had menus,
but that the core had them, so a library wanting only plugin discovery
inherited MenuPath, Display and a transitive AWT flavour.
Adds a layering section: foundation (built) / application model /
toolkit bindings / application, with only the bindings importing AWT or
Swing. All of the presentation metadata survives -- menu path, label,
icon, accelerator, weight, selection group, visibility, enablement --
since Fiji's menus are built from it. What changes is that it becomes
attributes in the annotation index rather than the
BasicDetails/UIDetails/AbstractUIDetails inheritance chain every plugin
extends.
Notes that the expensive part is already solved: SciJava Common builds
its menu from ModuleInfo, naming classes without loading them and
loading on demand, which is exactly the implClassName()/type()/get()
split of Discovery. The other seams -- harvesting as a Preprocessor,
displays as a Postprocessor, input events with Consumable -- were built
in phases 1-3 with this in mind.
Also records that the real risk is migration rather than architecture:
hundreds of commands across dozens of repositories cannot update on a
flag day, so the one-way legacy bridge matters more than its deferral
implies and should be sequenced with layer 1 rather than after it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gJpzGd3ksbME4CN6Tu2ni
Only layer 2 imports AWT or Swing. Layer 0 never mentions a user interface, so
697
+
headless is not a mode — it is what the core does.
698
+
699
+
### The mechanisms are already in place
700
+
701
+
The machinery the application shell needs was built in phases 1-3, and in
702
+
several cases was built *because* of it:
703
+
704
+
| Fiji needs | Built |
705
+
| --- | --- |
706
+
| Menus over hundreds of commands, without loading their classes | the `@Plugin` index, and `Discovery.implClassName()`/`attrs()` before `type()`/`get()`|
707
+
| Parameter dialogs |`Preprocessor`: harvesting is a preprocessing step |
708
+
| "The user pressed Cancel" |`Execution.decline(reason)`, reported by `ExecutionResult`|
709
+
| Showing outputs |`Postprocessor`: the `DisplayPostprocessor` seam |
710
+
| Tool and input events, one handler claiming a keystroke |`scijava-events`, with `Consumable`|
711
+
| Menu ordering |`scijava-priority`, plus a weight attribute in the index |
712
+
713
+
NB: SciJava Common builds its menu from `ModuleInfo`, whose
714
+
`getDelegateClassName()` names the class without loading it and whose
715
+
`loadDelegateClass()` loads on demand. That is exactly the
716
+
`implClassName()`/`type()`/`get()` split of `Discovery`, so the expensive part
717
+
of the menu story is already solved and tested.
718
+
719
+
### What changes, and what does not
720
+
721
+
**All of the presentation metadata survives** — menu path, label, icon,
722
+
accelerator, weight, selection group, visibility, enablement. Fiji's menus are
723
+
built from it, and hundreds of commands depend on it.
724
+
725
+
**It becomes data rather than an inheritance chain.** SciJava Common has
726
+
`BasicDetails` → `UIDetails` → `AbstractUIDetails`, which every plugin extends
727
+
in order to carry a label. Here it is attributes in the annotation index, read
728
+
without loading, with a command-info view over `Discovery`. The same
729
+
information, fewer types, a faster menu build. Expect commands to look like:
Copy file name to clipboardExpand all lines: docs/migration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ A **dropped** row is a successful outcome, not a gap.
86
86
|`Contextual`, `AbstractContextual`, `NullContextException`| dropped — a service receives its context in `Service.initialize(Context)`, so it need not carry one, and there is no null-context state to report | dropped |
87
87
|`Gateway`, `AbstractGateway`, `SciJava`| Phase 2, if retained at all | open |
88
88
|`Instantiable`, `InstantiableException`| subsumed by `Discovery`| planned |
|`BasicDetails`, `AbstractBasicDetails`, `UIDetails`, `AbstractUIDetails`, `MenuEntry`, `MenuPath`|`scijava-command` presentation metadata (layer 1). All of it survives — menu path, label, icon, accelerator, weight, selection group, visibility, enablement — but as attributes in the annotation index rather than an inheritance chain every plugin extends | planned|
90
90
|`Validated`, `ValidityProblem`| execution layer (Phase 3) | open |
91
91
|`Optional`|`scijava-optional` (satellite repo, moves in later) | open |
92
92
@@ -125,7 +125,7 @@ A **dropped** row is a successful outcome, not a gap.
125
125
|`command`| still to come: a command is a struct plus menu metadata plus `run`| planned |
|`ui`, `menu`|`scijava-ui-api` (toolkit-agnostic contracts) and `scijava-menu` (the menu tree), with `ApplicationFrame`/`Desktop`/`StatusBar`/`ToolBar`as contracts there and implementations in the toolkit bindings. Dropped from the *core*, not from the stack — see the layering section of [migration-plan.md](migration-plan.md)| planned |
0 commit comments