-
Notifications
You must be signed in to change notification settings - Fork 93
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
Update SEU Colors Feature #1878
Update SEU Colors Feature #1878
Conversation
* Updated SEUColorProvider to address issue with overlapping characters (SEUColorProvider now calculates Ranges based on character count rather than byte count) * Updated the SEUColorProvider code that looks for color code sequences in the source member to use a Map-based function rather than individually check against every possible color code for each byte (also updated SEUColors to provide the aforementioned function) * When a color code is found, the styling now only applies until another color code is found (or until the line ends) * Added a function to SEUColors.ts that uses a Map to check whether a given byte sequence matches any of the color sequences * When reading bytes from a source member, SEUColorProvider now uses the aforementioned Map-based function on each byte rather than individually checking it against every possible color sequence, to save time * Addressed issue with overlapping characters
@steph-beneschan-256 This PR is awesome. Any chance you can share the raw hex of a member that you tested this with? I'd like to be able to test this but I have no test data. |
Hello @worksofliam ! Here is the hex dump from the member that I used: COLORTEST.txt |
@steph-beneschan-256 What is the record length for that source file you used? I am going to write a test case to create that member with an example. |
@steph-beneschan-256 Is it possible you could get me a hex dump to that member using SQL instead? select hex(srcdta) from lib.sourcefile You may have to create an alias to the member to read it with SQL. |
@steph-beneschan-256 Please see my above comment, thanks! |
We are removing SEU colour support in 3.0.0, so I will close this PR. Thanks for you work, nonetheless! |
Changes
Update SEU Colors Feature
Updated SEUColorProvider.ts to address issue with overlapping characters (Show SEU Colors feature is overlaying characters #1490) (the code now calculates ranges based on character count rather than byte count)
Updated the SEUColorProvider.ts code that looks for color code sequences in the source member to use a Map-based function rather than individually check against every possible color code for each byte (also updated SEUColors.ts to provide the aforementioned function)
When a color code is found, the styling now only applies until another color code is found (or until the line ends)
Added a function to SEUColors.ts that uses a Map to check whether a given byte sequence matches any of the color sequences
When reading bytes from a source member, SEUColorProvider.ts now uses the aforementioned Map-based function on each byte rather than individually checking it against every possible color sequence, to save time
Checklist
console.log
s I added