Remove dead FsFeatDefnUi class and stale JumpToRecord comments - #1045
Open
mark-sil wants to merge 1 commit into
Open
Remove dead FsFeatDefnUi class and stale JumpToRecord comments#1045mark-sil wants to merge 1 commit into
mark-sil wants to merge 1 commit into
Conversation
FsFeatDefnUi was unreachable: its only external reference was the FsFeatDefnTags.kClassId case in CmObjectUi.CreateNewUiObject, whose sole call chain (DataTreeInsert command -> Slice.HandleInsertCommand -> Slice.InsertObject) can never deliver that class id. No configuration XML uses className="FsFeatDefn", and FsFeatDefn is abstract, so Slice.InsertObject bails out before CreateNewUiObject is called (MoForm is the only abstract class it special-cases). MakeUi never constructs FsFeatDefnUi either. Inserting features works through the CmdInsert*Feature commands via RecordClerk.OnInsertItemInVector and the Master*FeatDlgListeners, which are unaffected. Even user-customized or extension-supplied configuration XML could not reach this code: the abstract-class check lives in compiled code and the compiled LCM model, so a hand-added DataTreeInsert command with className="FsFeatDefn" was already a silent no-op before this change, and behaves identically after it. Also removed commented-out JumpToRecord sends in MasterPhonFeatDlgListener and MasterInflFeatDlgListener and folded the comment lines that referred to them into a single accurate line. Groundwork for the JumpToRecord Mediator-to-PubSub conversion: this removes one of the seven synchronous SendMessage senders as dead code before the conversion starts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1045 +/- ##
=======================================
Coverage 33.10% 33.10%
=======================================
Files 1201 1200 -1
Lines 277959 277937 -22
Branches 37130 37128 -2
=======================================
+ Hits 92018 92019 +1
+ Misses 158146 158126 -20
+ Partials 27795 27792 -3
🚀 New features to boost your workflow:
|
jasonleenaylor
approved these changes
Aug 6, 2026
jasonleenaylor
left a comment
Contributor
There was a problem hiding this comment.
@jasonleenaylor reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on mark-sil).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dead-code removal ahead of the JumpToRecord Mediator-to-PubSub conversion (follow-up in the spirit of #1032/#1044). Removes one of the seven synchronous
SendMessage("JumpToRecord")senders as dead code before the conversion starts.Src/FdoUi/FsFeatDefnUi.cs— the entire class is unreachable (see analysis below), including itsSendMessage("JumpToRecord").FdoUiCore.cs— remove the unreachablecase FsFeatDefnTags.kClassId:fromCmObjectUi.CreateNewUiObject.MasterPhonFeatDlgListener.cs/MasterInflFeatDlgListener.cs— delete commented-out//m_mediator.SendMessage("JumpToRecord", ...)lines and fold the comment lines that referred to them into a single accurate line.Why FsFeatDefnUi is unreachable
FsFeatDefnTags.kClassIdcase inCmObjectUi.CreateNewUiObject(FdoUiCore.cs).DTMenuHandler→Slice.HandleInsertCommand→Slice.InsertObject→CmObjectUi.CreateNewUiObject. (The one otherHandleInsertCommandcaller,InflAffixTemplateMenuHandler, is inside#if Later— compiled out.)className="FsFeatDefn"to an insert command.Slice.InsertObjectreturns -1 for abstract classes before callingCreateNewUiObject—FsFeatDefnis abstract in the LCM model;MoFormis the only abstract class it special-cases (remapped to a concrete allomorph class).MakeUiuses an explicit compiled switch (no reflection-by-name) and never constructsFsFeatDefnUi.DataTreeInsertcommand withclassName="FsFeatDefn"was already a silent no-op before this change and behaves identically after it.What stopped happening, and why each disappearance is safe
CmdInsertClosedFeature/CmdInsertComplexFeature/CmdInsertPhonologicalClosedFeatureviaRecordClerk.OnInsertItemInVector→ theDialogInsertItemInVectorPub/Sub event → theMaster*FeatDlgListeners, which are unaffected (their liveBroadcastMessageUntilHandled("JumpToRecord", ...)sends remain).Validation
.\build.ps1 -SkipNative: Build succeeded, 0 errors;FdoUi.dllandMorphologyEditorDll.dllrebuilt.FsFeatDefnUiorFsFeatDefnTagsinSrc/FdoUi.🤖 Generated with Claude Code
This change is