vscode-ibmi icon indicating copy to clipboard operation
vscode-ibmi copied to clipboard

Update SEU Colors Feature

Open steph-beneschan-256 opened this issue 1 year ago • 4 comments
trafficstars

Changes

Update SEU Colors Feature

  • Updated SEUColorProvider.ts to address issue with overlapping 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

  • [x] have tested my change
  • [ ] updated relevant documentation
  • [x] Remove any/all console.logs I added
  • [x] eslint is not complaining
  • [x] have added myself to the contributors' list in CONTRIBUTING.md

steph-beneschan-256 avatar Feb 27 '24 05:02 steph-beneschan-256

@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.

worksofliam avatar Feb 27 '24 15:02 worksofliam

Hello @worksofliam ! Here is the hex dump from the member that I used: COLORTEST.txt

steph-beneschan-256 avatar Feb 28 '24 04:02 steph-beneschan-256

@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.

worksofliam avatar Mar 05 '24 15:03 worksofliam

@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.

worksofliam avatar Mar 05 '24 15:03 worksofliam

@steph-beneschan-256 Please see my above comment, thanks!

worksofliam avatar May 15 '24 13:05 worksofliam

We are removing SEU colour support in 3.0.0, so I will close this PR. Thanks for you work, nonetheless!

https://github.com/orgs/codefori/discussions/2057

worksofliam avatar May 15 '24 14:05 worksofliam