You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Custom Folding Regions have been enhanced to allow using the same text for both the start and end region comment.
35
+
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.
36
+
The last section automatically ends when the last block is closed or at the end of the file.</p>
37
+
38
+
<p>This is useful if a class (or other Java file) contains multiple sections that are seperated with some comment.
39
+
To use this functionality, check “Enable folding of custom regions” in <code>Window > Preferences > Java > Editor > Folding</code> and enter the same text in “Region start comment text” and “Region end comment text”.</p>
40
+
41
+
<p><imgsrc="images/overlappingStartEndCustomRegionMarkersPrefs.png" alt="Preference window with folding of custom regions enabled and the start and end region markers set to the same text" /></p>
42
+
43
+
<p>This marker can then be used in comments to separate start and end regions.</p>
44
+
45
+
<p><imgsrc="images/overlappingStartEndCustomRegionMarkersExpanded.png" alt="Java class with multiple sections seperated by comments" /></p>
46
+
47
+
<p><imgsrc="images/overlappingStartEndCustomRegionMarkersCollapsed.png" alt="The same Java class with some regions collapsed" /></p>
48
+
49
+
<h3>New quick-fix/clean-up to replace deprecated fields</h3>
<p>In a previous release, support was added to replace deprecated method calls with a suggested replacement found in Javadoc. With this release, it is now possible to also replace fields with suggested replacements.</p>
61
+
62
+
<p>The new clean-up is found by going to the <code>Source Fixing</code> tab of the Clean-up Configuration dialog and selecting: <code>Replace deprecated field where possible</code>. The quick-fix is accessible by clicking CTRL+space on the deprecated field reference.</p>
63
+
64
+
<p><imgsrc="images/deprecatedFieldCleanUp.png" alt="Setting the deprecated field clean-up" /></p>
65
+
66
+
<p>To make the field replaceable, the Javadoc should specify the alternate field or constant to use. For example, for the following code:</p>
67
+
68
+
<p><imgsrc="images/deprecatedFieldExampleBefore.png" alt="Code example for deprecated field" /></p>
69
+
70
+
<p>results in:</p>
71
+
72
+
<p><imgsrc="images/deprecatedFieldExampleAfter.png" alt="Code example after clean-up" /></p>
73
+
74
+
<p>after applying the clean-up.</p>
75
+
76
+
<h3>Access modifier specification added to Extract Method</h3>
<p>When extracting code to a method, a user can now specify access modifiers for the new method including: <code>public</code>, <code>protected</code>, <code>package-private</code>, <code>private</code>, <code>final</code>, and <code>synchronized</code>.</p>
88
+
89
+
<p><imgsrc="images/extractMethodAccessors.png" alt="Example of new Extract Method dialog" /></p>
90
+
91
+
<h2>Debugger</h2>
92
+
93
+
<h3>Toggle Triggerpoint and Breakpoint with Hit Count</h3>
<li><ahref="https://github.com/subyssurendran666">Suby S Surendran</a>
101
+
</details></li>
102
+
</ul>
103
+
104
+
105
+
<p>The ruler context menu in the editor has been enhanced to make debugging setup more efficient. You can now directly toggle a breakpoint with hit count or a triggerpoint by <code>right-clicking on the vertical ruler</code> (left margin), where the context menu includes the options Toggle Breakpoint with Hit Count and Toggle Triggerpoint.</p>
106
+
107
+
<p><imgsrc="images/rulerToggleMenuWithHitcountAndTriggerpoint.png" alt="Ruler context menu in the Java editor showing new entries for Toggle Breakpoint with Hit Count and Toggle Triggerpoint" /></p>
Copy file name to clipboardExpand all lines: news/4.37/jdt.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,40 @@ This marker can then be used in comments to separate start and end regions.
38
38
39
39

40
40
41
+
### New quick-fix/clean-up to replace deprecated fields
42
+
<details>
43
+
<summary>Contributors</summary>
44
+
45
+
-[Jeff Johnston](https://github.com/jjohnstn)
46
+
</details>
47
+
48
+
In a previous release, support was added to replace deprecated method calls with a suggested replacement found in Javadoc. With this release, it is now possible to also replace fields with suggested replacements.
49
+
50
+
The new clean-up is found by going to the `Source Fixing` tab of the Clean-up Configuration dialog and selecting: `Replace deprecated field where possible`. The quick-fix is accessible by clicking CTRL+space on the deprecated field reference.
51
+
52
+

53
+
54
+
To make the field replaceable, the Javadoc should specify the alternate field or constant to use. For example, for the following code:
55
+
56
+

57
+
58
+
results in:
59
+
60
+

61
+
62
+
after applying the clean-up.
63
+
64
+
### Access modifier specification added to Extract Method
65
+
<details>
66
+
<summary>Contributors</summary>
67
+
68
+
-[Jeff Johnston](https://github.com/jjohnstn)
69
+
</details>
70
+
71
+
When extracting code to a method, a user can now specify access modifiers for the new method including: `public`, `protected`, `package-private`, `private`, `final`, and `synchronized`.
72
+
73
+

74
+
41
75
## Debugger
42
76
43
77
### Toggle Triggerpoint and Breakpoint with Hit Count
0 commit comments