TH3-Code Collapse » History » Version 1
Wil van Antwerpen, 05/18/2019 10:15 PM
| 1 | 1 | Wil van Antwerpen | # Code Collapse |
|---|---|---|---|
| 2 | |||
| 3 | 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 | This is one of those features that you don't miss until you actually have it. |
||
| 5 | |||
| 6 | Currently the following scope keywords automatically support the collapse feature: |
||
| 7 | |||
| 8 | * begin / end code blocks |
||
| 9 | * object / end_object |
||
| 10 | * class / end_class |
||
| 11 | * procedure / end_procedure |
||
| 12 | * function / end_function |
||
| 13 | * while / loop |
||
| 14 | * case begin / case end |
||
| 15 | * type / end_type |
||
| 16 | * struct / end_struct |
||
| 17 | * section metatags (see below) |
||
| 18 | |||
| 19 | ## section metatags |
||
| 20 | |||
| 21 | 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 | |||
| 23 | It works as follows: |
||
| 24 | |||
| 25 | ~~~ |
||
| 26 | { #CodeSection YourSection } |
||
| 27 | .... your code |
||
| 28 | { #CodeSection YourSection } |
||
| 29 | ~~~ |
||
| 30 | |||
| 31 | This then looks as follows: |
||
| 32 | |||
| 33 | <insert screenshot here> |
||
| 34 | |||
| 35 | ## compiler listfiles |
||
| 36 | |||
| 37 | This one is pretty useful and not one you would think of immediately. |
||
| 38 | |||
| 39 | 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 | |||
| 41 | 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. |