Open MeAmAnUsername opened 3 years ago
Thanks for submitting this detailed/well-worked out issue. I agree with your final assessment, so put it on the backlog. Most challenging part will perhaps be finding proper icons.
It turns out that Statix had an outline, but apparently it made the editor very slow: https://github.com/metaborg/nabl/commit/fcd1b64deacbd9d236c21ad96ef9e59d2822a018
Hmm. If it slows down the editor a lot then it's probably best to leave it disabled. Best case scenario it would update the outline after updating the editor instead of as part of updating the editor, but that likely requires redoing some of the Spoofax/Eclipse internals.
Short description Show strategies in the outline.
Problem description. I want to go to a function in a file somewhere. Pretty much all my files are hundreds of lines long, so scrolling takes a while and requires looking where I am approximately.
Describe the solution you'd like Show an outline of the Statix file in the outline view. Ideally it has nodes for every section, with only the
rules
section expanded. The rules section shows predicates / functions, and merges consecutive rules of the same function/predicate, for example:Would produce the outline
Describe alternatives you've considered I could use CTRL-F, use global search, or keep scrolling. Searching gets false positives in the form of references to that function, and scrolling costs time and requires checking where in the file you are.
Additional context Explanation of how to create an outline: https://www.spoofax.dev/references/editor-services/outline/ The PIE DSL source has the following definition, which seems like it would work decently:
Which has the following documentation:
This is not a massive improvement, but it is a nice QOL improvement and probably not much work.