Skip to content

LT-21945: Different modes for parsing vs. analyzing #373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 23, 2025
Merged

Conversation

jtmaxwell3
Copy link
Collaborator

@jtmaxwell3 jtmaxwell3 commented Jun 20, 2025

This implements https://jira.sil.org/browse/LT-21945. It includes the following changes:

  • A new version of liblcm with a new version of AnalysisGuessServices that has a PrioritizeParser parameter.
  • A menu for setting the interlinear mode that calls SetParsingMode.
  • Code for setting and getting the current parsing mode and changing the name of the Analyze tab.
  • Code to pass the current parsing mode to AnalysisGuessServices.
  • Code for GetGuessColor which is sensitive to the current parsing mode.

This change is Reviewable

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 10 of 10 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jtmaxwell3)


Src/LexText/Interlinear/InterlinVc.cs line 380 at r1 (raw file):

		}

		public bool GetParsingMode()

This is almost not worth doing, but let's change this to a property, maybe IsParsingMode? It makes the code read a bit better.


Src/LexText/Interlinear/SandboxBase.ComboHandlers.cs line 1128 at r1 (raw file):

				ITsStrBldr builder = TsStringUtils.MakeStrBldr();
				ITsString space = TsStringUtils.MakeString(fBaseWordIsPhrase ? "  " : " ", m_wsVern);
				var guess_services = new AnalysisGuessServices(m_caches.MainCache, m_sandbox.InterlinDoc.GetMaster().GetParsingMode());

Evaluate if InterlinDoc, or GetMaster can ever be null, if they could be then add a '?' before the '.' to prevent any null references in edge case scenarios.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jtmaxwell3)

@jtmaxwell3 jtmaxwell3 enabled auto-merge (squash) June 23, 2025 16:37
@jtmaxwell3 jtmaxwell3 merged commit 343c561 into release/9.3 Jun 23, 2025
4 of 5 checks passed
@jtmaxwell3 jtmaxwell3 deleted the LT-21945 branch June 23, 2025 16:54
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