Skip to content
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

SEU Colorisation Only Detecting First Hex Code #2434

Closed
BrianGodsend opened this issue Dec 24, 2024 · 3 comments
Closed

SEU Colorisation Only Detecting First Hex Code #2434

BrianGodsend opened this issue Dec 24, 2024 · 3 comments

Comments

@BrianGodsend
Copy link

BrianGodsend commented Dec 24, 2024

I enabled the Code for IBM i settings Show SEU Colors. I assumed this option is designed to scan a source line for 5250 display attributes (hex codes x20-x3F (and technically, xA0-xBF) and display the corresponding (default) 5250 emulation color.

After restarting, I opened a source member that made use of the 5250 display attribute hex codes to colorize a table in lines of comments. It appears that this setting is only detecting the first hex code.

The expectation is that each 5250 display attribute would be interpreted, thus allowing a single line of source to contain multiple colors. The end of the source line should assume a terminating display attribute of x20 (Normal) to ensure colorization is not "wrapped" to the next line.

In the following example, the table border should be shown in blue, the row title should be reverse image, the term should be highlighted, and the description should be normal. The table uses the following 5250 emulation display attributes:

  • x20 = Green text
  • x22 = White (highlighted) text
  • x23 = Reverse image, white (white background, black text)
  • x34 = Blue text
**FREE
///
// Handles SEU user line commands.
//
//  +------------------------------------------------------------------+
//  |         PASS 1 COMMANDS - DISPLAY/NON-ALTERING COMMANDS          |
//  +------------------------------------------------------------------+
//  | TERM    | Description of term.                                   |
//  |---------+--------------------------------------------------------|
//  | TERM    | Description of term.                                   |
//  +---------+--------------------------------------------------------+
///
*inLR = *ON;
return;

Focusing on the lines with the 5250 display attributes, they are shown with the hex values below, with the corresponding locations in the human-readable line being identified with ?:

// ?+------------------------------------------------------------------+?
6643466666666666666666666666666666666666666666666666666666666666666666642
110AE000000000000000000000000000000000000000000000000000000000000000000E0
// ?|?        PASS 1 COMMANDS - DISPLAY/NON-ALTERING COMMANDS         ?|?
66434244444444DCEE4F4CDDDCDCE464CCEDDCE6DDD6CDECDCDC4CDDDCDCE444444444342
110AF30000000071220103644154200049273181565013359957036441542000000000AF0
// ?+------------------------------------------------------------------+?
6643466666666666666666666666666666666666666666666666666666666666666666643
110AE000000000000000000000000000000000000000000000000000000000000000000EA
// ?|?TERM   ?|?Description of term.                                  ?|?
664342ECDD444342C8A8989A8994984A89944444444444444444444444444444444444342
110AF23594000AF04523997396506603594B0000000000000000000000000000000000AF0
// ?|---------+--------------------------------------------------------|?
6643466666666646666666666666666666666666666666666666666666666666666666642
110AF000000000E00000000000000000000000000000000000000000000000000000000F0
// ?|?TERM   ?|?Description of term.                                  ?|?
664342ECDD444342C8A8989A8994984A89944444444444444444444444444444444444342
110AF23594000AF04523997396506603594B0000000000000000000000000000000000AF0
// ?|---------+--------------------------------------------------------|?
6643466666666646666666666666666666666666666666666666666666666666666666642
110AF000000000E00000000000000000000000000000000000000000000000000000000F0

Also note there is a display problem that renders some characters as non-display. The highlight in the following image shows text that is rendered as non-display. The text is there, one can copy it and/or search for it, but it just does not appear on the screen. In the example, the most common error is the word "Display". On the first line of the description of the term it is rendered on the screen as "Di play". However, if you select "Di play" and cut-n-paste, it pastes the actual word "Display". Likewise, searching for the word "Display" will find "Di play". I tried a few different themes and resizing my window, nothing caused the hidden characters to appear.

image

(The highlight in the left-most column, is to point out that each term is missing the first character. Each term should begin with a "U" ... UDC, UDCM, UDDM, etc.)

And yes, I do realize the irony in positing an issue in Code for IBM i about colorizing source based on SEU/5250 display attribute codes and providing as an example source comments from an SEU user line command exit program.


Context Version
Code for IBM i version 2.14.5
Visual Studio Code version 1.96.2
Operating System win32_x64
Active extensions
.NET Install Tool (vscode-dotnet-runtime): 2.2.3
COBOL (cobol): 24.12.18
Code Coverage for IBM i (code-coverage-ibmi): 0.1.7
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Configuration Editing (configuration-editing): 1.0.0
Db2 for IBM i (vscode-db2i): 1.7.0
Dev Containers (remote-containers): 0.394.0
ESLint (vscode-eslint): 3.0.10
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.22.0
Extension Authoring (extension-editing): 1.0.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
GitHub Pull Requests (vscode-pull-request-github): 0.102.0
GitLens — Git supercharged (gitlens): 16.1.1
HTML CSS Support (vscode-html-css): 2.0.11
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6
IBM i Project Explorer (vscode-ibmi-projectexplorer): 2.12.0
JSON Language Features (json-language-features): 1.0.0
Jira and Bitbucket (Atlassian Labs) (atlascode): 3.2.1
Merge Conflict (merge-conflict): 1.0.0
NPM support for VS Code (npm): 1.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Nx Console (angular-console): 18.34.0
Path Intellisense (path-intellisense): 2.10.0
Prettier - Code formatter (prettier-vscode): 11.0.0
RPGLE (vscode-rpgle): 0.28.5
Reload (reload): 0.0.7
Source Orbit (vscode-sourceorbit): 1.0.2
TODO Highlight (vscode-todo-highlight): 1.0.5
Todo Tree (todo-tree): 0.0.226
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
WSL (remote-wsl): 0.88.5
YAML (vscode-yaml): 1.15.0

Remote system
Setting Value
IBM i OS V7R4M0
Tech Refresh 7
CCSID Origin 37
Runtime CCSID 37
Default CCSID 37
SSHD CCSID ?
cqsh true
SQL Enabled
Source dates Disabled

Enabled features

/QOpenSys/pkgs/bin /usr/bin /QSYS.lib/ILEDITOR.lib /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin /QOpenSys/QIBM/ProdData/JavaVM/jdk80
bash attr GETNEWLIBL.PGM QZDFMDB2.PGM startDebugService.sh 64bit
chsh iconv
find setccsid
git uname
grep
ls
md5sum
sort
stat
tar
tn5250
Shell env
BUILDLIB=QGPL
CURLIB=QGPL
LIBLS=QDEVTOOLS QHLPSYS IPMDPGM2 VAR350FT VSIMGDSP PACIVFIL PACIVOBJ PACIVSYS LAWPGM10 LAWAPP10DB LAWMOD10 DBU11 QSYS38 IPTSUTL IPTKLNK IPSAPGM IPSAFIL1 IPWMPGM IPASPGM IPASFIL1 IPPAFIL1 IPTSPGM IPTSFIL1 BSLIB QTEMP IPTSPCH IPTSMOD IPTSMOD1
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
TZ=<EST>5<EDT>,M3.2.0,M11.1.0
_=/QOpenSys/usr/bin/env
Variants
{
  "american": "#@$",
  "local": "#@$",
  "qsysNameRegex": {}
}
@SJLennon
Copy link
Contributor

@BrianGodsend You might want to look at the discussion titled "We are removing SEU colour support support in 3.0.0", here: https://github.com/orgs/codefori/discussions/2057

@BrianGodsend
Copy link
Author

Wow, my google powers are really starting to fail me. Thank you for pointing me to the open (and obviously related) discussion.

This is also related to Some 5250 attribute bytes are not preserved #2211.

@worksofliam
Copy link
Contributor

Thanks for sharing that @SJLennon. I am going to close this due to the fact we are not going to support 5250 colors much longer.

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

No branches or pull requests

3 participants