shriprem / FWDataViz

Fixed Width Data Visualizer plugin for Notepad++. Turns Notepad++ into Excel for fixed-width data files. Displays cursor position data. Jumps to specific fields. Folding Record Blocks. Extracts Data. Builtin dialogs to configure file-type, record-type & fields; Themes & Colors; and Folding. Handles homogenous, mixed & multi-line records.
GNU General Public License v2.0
37 stars 6 forks source link

Folding Record Blocks #70

Closed shriprem closed 2 years ago

jeff-bowles commented 2 years ago

Hello - Is there a binary DLL available for me to try out? I don't have a ready means of compiling c++.

On Sun, Jun 26, 2022 at 4:18 PM Shridhar Kumar @.***> wrote:

Merged #70 https://github.com/shriprem/FWDataViz/pull/70 into master.

— Reply to this email directly, view it on GitHub https://github.com/shriprem/FWDataViz/pull/70#event-6880842991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHX3T72ZLOEM77KMVLYUH4LVRC3J3ANCNFSM5Z4OWEBQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

shriprem commented 2 years ago

Hi @jeff-bowles, I was hoping to write some coherent usage documentation before providing you with a pre-release version to try out. I will probably finish the documentation by tomorrow. But since my pace slows down to a crawl during the documentation phase (a task I don't enjoy as much as coding), there will likely be some delays beyond that as well.

So, if you are keen on trying out FWDataViz earlier than that, you can use the zip files attached below. But please be sure to review my brief usage notes below. And, let me know if you need further clarifications or have any questions or feedback. FWDataViz_x86_2.6.0.0-Pre.zip FWDataViz_x64_2.6.0.0-Pre.zip

Side note:

  • If you need the DLLs from the latest commit CI build, you can obtain it from GitHub without reaching out to me. On the plugin repo page, click on Actions » CI_build and then click on the link for the top workflow run. The resulting page will list the DLL files from the CI builds for the commit.
  • For latest Notepad++ builds, go to the Notepad++ AppVeyor Build History page. Then click on the link for the latest completed build (the top one with a green line on its side). Then click the link for Release version to match your NPP environment. Finally, click the Artifacts tab link to view the exe download link.
I recommend that you use the menu option: Settings » Import » Import Plugin(s) and select the folder wherein you downloaded the zip file matching your Notepad++ version bitness. However, if you prefer to update FWDataViz selectively, you will need to copy these 4 files that are new/changed: File Status Install Location
FWDataViz.dll Changed <Notepad++_executable_folder>/plugins/FWDataViz/
default_FoldStructs.ini New <Notepad++_executable_folder>/plugins/FWDataViz/
default_Visualizer.ini Changed <Notepad++_executable_folder>/plugins/FWDataViz/
Samples/Ouroboros.txt New <Notepad++_executable_folder>/plugins/FWDataViz/Samples/

Version Enhancements

Major Enhancements

  1. Foldable Record Blocks.
  2. [Side Panel] Default Background checkbox option to suppress the background colors specified in theme styles.
  3. [Side Panel] Show Calltip checkbox option to display inline Cursor Position Data.

Minor Enhancements

  1. [Side Panel] Fold and Unfold buttons for: All Levels and Level 1 to Level 10. These buttons are functional with any file (fixed-width or not) opened in Notepad++.
  2. [Side Panel] Toggle Line button to toggle between folded and unfolded states on the current line. This button is functional with any file (fixed-width or not) opened in Notepad++.
  3. [Preferences Dialog] Specify color and transparency for the horizontal demarcator lines drawn above and below the fold header text-line when the block it encloses is in collapsed state. This preference setting is applied globally for all files open in Notepad++.

Pending

  1. An editor GUI to define and modify record block structures for fixed-width file types (that have been defined either via the File Type Metadata Editor or directly in Visualizer.ini file). This editor will be implemented in due course for the next general release of FwDataViz.

Known Issues

  1. If you use Notepad++ menu options to fold levels, the text in the view page may end up partially colorized. However, if you move the caret (i.e., keyboard cursor) to a different position, the page will be fully colorized again. You can avoid this by using the Fold and Unfold buttons on the FWDataViz side panel.
  2. If you edit the data file, you may also need to click on the Apply button on the FWDataViz side panel to rescan the file and rebuild the new folding structure. No workaround for this, since any file edits may require a full file scan which will not be optimal if done automatically for each bit of file edit.

Brief Usage Notes

The definition scheme for record blocks will reside in the new FoldStructs.ini file. Upon the first run of Notepad++ after upgrading the FWDataViz dll, this new file will get copied into either of the two folder locations:

  1. %APPDATA%/Notepad++/plugins/Config/FWDataViz/ (for non-portable installs of NPP) or
  2. <Notepad++_executable_folder>/plugins/Config/FWDataViz/ (for portable installs of NPP)

FoldStructs.ini file layout

With each file type section:


Sample Files with Folding

View the sample files and then review their definitions in FoldStructs.ini file.

1. ICD-10 Billable-Flagged Order Codes

This file has the most basic record block folding with just two record types, and only one level of folding. image

2. Treasury IPAC (ANSI) File

This file has three levels of hierarchical folding. Yet the structure is simple since no recursive nesting is involved. image

3. Ouroboros Fold Levels

This sample file is named after the icon of a serpent eating its own tail. This contrived sample file is being included to showcase the full possibilities with the record block folding feature of FWDataViz.

To gain better sense of the folding structure in this file, turn on the Show Calltip option on the side panel, and then click on lines 1 through 10. The last line in the calltip will indicate the fold level for the current line. image