Skip to content

LT-21515: Implement GetToolForList in Pub/Sub system#930

Open
mark-sil wants to merge 1 commit into
mainfrom
LT-21515
Open

LT-21515: Implement GetToolForList in Pub/Sub system#930
mark-sil wants to merge 1 commit into
mainfrom
LT-21515

Conversation

@mark-sil

@mark-sil mark-sil commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

This change is Reviewable

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   11m 12s ⏱️ -36s
4 210 tests ±0  4 140 ✅ ±0  70 💤 ±0  0 ❌ ±0 
4 219 runs  ±0  4 149 ✅ ±0  70 💤 ±0  0 ❌ ±0 

Results for commit 439527c. ± Comparison against base commit 53d5dbb.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the “GetToolForList” lookup used during link-following (when a link’s tool is "default" and the target is a CmPossibilityList) from the obsolete XCore Mediator.SendMessage reflection pathway to the FieldWorks FwUtils Publisher/Subscriber pub-sub system, reducing reliance on obsolete APIs and cross-assembly mediator messaging.

Changes:

  • Replace m_mediator.SendMessage("GetToolForList", ...) with Publisher.Publish(EventConstants.GetToolForList, ...) in LinkListener.
  • Add EventConstants.GetToolForList subscription/unsubscription in AreaListener.
  • Convert the handler from OnGetToolForList (mediator/reflection shape) to a pub-sub handler that returns the tool name via parameters[1].

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Src/xWorks/LinkListener.cs Publishes GetToolForList via pub-sub instead of calling obsolete mediator reflection.
Src/LexText/LexTextDll/AreaListener.cs Subscribes to GetToolForList and provides the handler to map a list to its editing tool name via the pub-sub payload.

@@ -512,9 +512,7 @@ private bool FollowActiveLink(bool suspendLoadingRecord)
// Thus we've created this method (on AreaListener) which we call awkwardly throught the mediator.
Subscriber.Subscribe(EventConstants.SetToolFromName, SetToolFromName);
Subscriber.Subscribe(EventConstants.ReloadAreaTools, ReloadAreaTools);
Subscriber.Subscribe(EventConstants.GetContentControlParameters, GetContentControlParameters);
Subscriber.Subscribe(EventConstants.GetToolForList, GetToolForList);
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.

2 participants