fix: enable infoset and infoset-diff views from any file context during debugging#1704
Open
social5h3ll wants to merge 1 commit into
Open
Conversation
…ng debugging Currently 'Display the infoset view' and 'View infoset diff' commands are only enabled when the active editor is a DFDL schema file (`editorLangId == 'dfdl'`). This prevents users from opening the infoset or infoset-diff views via the Daffodil helper tab when the active file is not the schema file. Fix: remove the `editorLangId == 'dfdl'` condition from both the `enablement` field in commands and the `when` clause in `editor/title` menu, so the buttons are available whenever a debug session is active. Closes apache#1703
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.
Fixes: #1703
Problem
While parsing a file, the Daffodil helper tab does not list the option to open the Infoset or Infoset Diff View unless the active tab is the DFDL schema file. This is because the
infoset.displayandinfoset.diffcommands are gated byeditorLangId == 'dfdl'— they only appear when a DFDL schema file is the active editor.This means if a user is debugging and switches to a data file or any other file type, they cannot access the infoset views from the Daffodil helper.
Root Cause
In
package.json, the command enablement and menuwhenclauses both includededitorLangId == 'dfdl':This condition restricts the infoset commands to DFDL schema editors only, even though the infoset data is available throughout the debug session.
Fix
Remove
&& editorLangId == 'dfdl'from both theenablementfield and theeditor/titlemenuwhenclause for bothinfoset.displayandinfoset.diffcommands.After the fix:
enablement:inDebugModewhen:inDebugModeThis keeps the commands available only during active debug sessions but removes the schema-file-only restriction, so users can open the infoset views from any file context while debugging.
Acceptance Criteria
inDebugMode(not available outside debug sessions)Closes #1703