Skip to content

Commit 53b72c2

Browse files
danthe1stmerks
authored andcommitted
add N&N entry for allowing overlapping start and end markers for custom
folding regions eclipse-jdt/eclipse.jdt.ui#2282
1 parent f853b5e commit 53b72c2

4 files changed

Lines changed: 25 additions & 2 deletions
60.9 KB
Loading
93.9 KB
Loading
80.4 KB
Loading

news/4.37/jdt.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,33 @@ A special thanks to everyone who [contributed to JDT](acknowledgements.md#java-d
1212
## JUnit
1313
-->
1414

15-
<!--
15+
1616
---
1717
## Java Editor
18-
-->
18+
19+
### Support Overlapping Start and End Markers for Custom Folding Regions
20+
<details>
21+
<summary>Contributors</summary>
22+
23+
- [Daniel Schmid](https://github.com/danthe1st)
24+
</details>
25+
26+
Custom Folding Regions have been enhanced to allow using the same text for both the start and end region comment.
27+
If the start and end region markers are the same, the same comment can be used to end a folding region and start a new one.
28+
The last section automatically ends when the last block is closed or at the end of the file.
29+
30+
This is useful if a class (or other Java file) contains multiple sections that are seperated with some comment.
31+
To use this functionality, check "Enable folding of custom regions" in `Window > Preferences > Java > Editor > Folding` and enter the same text in "Region start comment text" and "Region end comment text".
32+
33+
![Preference window with folding of custom regions enabled and the start and end region markers set to the same text](images/overlappingStartEndCustomRegionMarkersPrefs.png)
34+
35+
This marker can then be used in comments to separate start and end regions.
36+
37+
![Java class with multiple sections seperated by comments](images/overlappingStartEndCustomRegionMarkersExpanded.png)
38+
39+
![The same Java class with some regions collapsed](images/overlappingStartEndCustomRegionMarkersCollapsed.png)
40+
41+
1942

2043
<!--
2144
---

0 commit comments

Comments
 (0)