Project

General

Profile

TH3-Code Collapse » History » Version 1

Wil van Antwerpen, 05/18/2019 10:15 PM

1 1 Wil van Antwerpen
# Code Collapse
2 1 Wil van Antwerpen
3 1 Wil van Antwerpen
The Hammer 3.0 is based on the scintilla control and as such it wasn't too hard to add code collapse specifically for the DataFlex language.
4 1 Wil van Antwerpen
This is one of those features that you don't miss until you actually have it.
5 1 Wil van Antwerpen
6 1 Wil van Antwerpen
Currently the following scope keywords automatically support the collapse feature:
7 1 Wil van Antwerpen
8 1 Wil van Antwerpen
* begin / end code blocks
9 1 Wil van Antwerpen
* object / end_object
10 1 Wil van Antwerpen
* class / end_class
11 1 Wil van Antwerpen
* procedure / end_procedure
12 1 Wil van Antwerpen
* function / end_function
13 1 Wil van Antwerpen
* while / loop
14 1 Wil van Antwerpen
* case begin / case end
15 1 Wil van Antwerpen
* type / end_type
16 1 Wil van Antwerpen
* struct / end_struct
17 1 Wil van Antwerpen
* section metatags (see below)
18 1 Wil van Antwerpen
19 1 Wil van Antwerpen
## section metatags
20 1 Wil van Antwerpen
21 1 Wil van Antwerpen
If you want to be able to collapse a whole bunch of code so that you can quickly hide specific parts of code then use the section metatag collapse feature.
22 1 Wil van Antwerpen
23 1 Wil van Antwerpen
It works as follows:
24 1 Wil van Antwerpen
25 1 Wil van Antwerpen
~~~
26 1 Wil van Antwerpen
  { #CodeSection YourSection }
27 1 Wil van Antwerpen
.... your code
28 1 Wil van Antwerpen
  { #CodeSection YourSection }
29 1 Wil van Antwerpen
~~~
30 1 Wil van Antwerpen
31 1 Wil van Antwerpen
This then looks as follows:
32 1 Wil van Antwerpen
33 1 Wil van Antwerpen
<insert screenshot here>
34 1 Wil van Antwerpen
35 1 Wil van Antwerpen
## compiler listfiles
36 1 Wil van Antwerpen
37 1 Wil van Antwerpen
This one is pretty useful and not one you would think of immediately.
38 1 Wil van Antwerpen
39 1 Wil van Antwerpen
If you have a .prn/.prp file then you actually have code collapse in there as well (was broken, just fixed 2019-05-17)
40 1 Wil van Antwerpen
41 1 Wil van Antwerpen
It can really be a drag having to plough through all that code. Being able to use code collapse in here does help quite a bit.