Add tooltips for JCL from jes-explorer#377
Draft
1000TurquoisePogs wants to merge 2 commits intofeature/v3/lang-hlasmfrom
Draft
Add tooltips for JCL from jes-explorer#3771000TurquoisePogs wants to merge 2 commits intofeature/v3/lang-hlasmfrom
1000TurquoisePogs wants to merge 2 commits intofeature/v3/lang-hlasmfrom
Conversation
Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
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.
Proposed changes
This PR adds hover documentation to the existing JCL language mode in the zlux-editor Monaco integration.
JCL source files already had syntax highlighting (the ISPF-style color scheme). This PR adds a hover provider so that placing the cursor over any JCL keyword or parameter name displays a brief description of what it does. No changes are made to the tokenizer or theme.
Changes:
webClient/src/app/editor/code-editor/monaco/hiliters/jcl.ts-- added new exportJCL_HOVER_DOCS: Record<string, string>containing hover documentation for 60+ JCL keywords, organized into four groups:webClient/src/app/editor/code-editor/monaco/monaco.config.ts-- updated the JCL import to includeJCL_HOVER_DOCSand registered aregisterHoverProvider('jcl', ...)that resolves the word at the cursor (uppercased) againstJCL_HOVER_DOCS. A secondary check extracts parameter names fromPARAM=context on the line to handle sub-keywords like RECFM and LRECL.This PR addresses Issue: zowe/zlux#538
Type of change
PR Checklist
Testing
.jclor.cntlextension) via the File Explorer. The JCL language mode and ISPF-style color theme should apply as before.JOBon the JOB card -- should show a description of the JOB statement.EXEC-- should describe the EXEC statement and mention PGM= vs PROC.DD-- should describe the DD statement and list key parameters.PROC,PEND,IF,THEN,ELSE,ENDIF-- each should have its own tooltip.INCLUDEandJCLLIB-- should describe library concatenation.DSN-- should describe data set naming including&&nameand*.DISP-- should describe status and normal/abnormal disposition values.SYSOUT-- should describe JES spool output classes.SPACE-- should describe TRK/CYL allocation syntax.RECFM,LRECL,BLKSIZE-- each should describe the DCB sub-parameter.CLASS,MSGCLASS,MSGLEVEL,NOTIFY,REGION,TIME,COND-- each should show a description.