|
| 1 | +# Java Development Tools - 4.36 |
| 2 | + |
| 3 | +<!-- |
| 4 | +--- |
| 5 | +## Java™ XX Support |
| 6 | +--> |
| 7 | + |
| 8 | +<!-- |
| 9 | +--- |
| 10 | +## JUnit |
| 11 | +--> |
| 12 | + |
| 13 | +--- |
| 14 | +## Java Editor |
| 15 | + |
| 16 | +### Custom Folding Regions |
| 17 | + |
| 18 | +It is now possible to create custom folding regions by specifying a comment at the start and end of the region. |
| 19 | +You can enable and configure this feature under `Window > Preferences > Java > Editor > Folding > Custom folding regions`. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +on that preference page, you can specify the text that should be used to start and end a custom folding region. |
| 24 | +When this is enabled, |
| 25 | +writing a comment starting with the specified region start followed by another comment starting with the specified region end creates a folding region. |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +Custom folding regions can be collapsed like any other folding regions. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +### Project Properties Page for Folding |
| 34 | + |
| 35 | +Preferences for folding can now be configured on a per-project basis in addition to configuring folding for the workspace. |
| 36 | +This page is available under `Project > Properties > Java Editor > Folding`. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +### New folding mechanism as Default |
| 41 | + |
| 42 | +In the previous release, a preference to enable different kinds of folding was introduced, |
| 43 | +see the news for [4.35](../4.35/jdt.html#new-folding). |
| 44 | +The feature has been further improved since then and is now **enabled by default**. |
| 45 | + |
| 46 | +This feature enhances the code folding mechanism in Eclipse JDT by enabling folding for control statements |
| 47 | +such as **if**, **while**, **switch**, and **for**. |
| 48 | +It improves code readability and navigation by allowing developers to collapse and expand structured blocks. |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +The feature can be disabled in the settings under `Java > Editor > Folding`. |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +<!-- |
| 58 | +--- |
| 59 | +## Java Views and Dialogs |
| 60 | +--> |
| 61 | + |
| 62 | +<!-- |
| 63 | +--- |
| 64 | +## Java Compiler |
| 65 | +--> |
| 66 | + |
| 67 | +<!-- |
| 68 | +--- |
| 69 | +## Java Formatter |
| 70 | +--> |
| 71 | + |
| 72 | +--- |
| 73 | +## Debug |
| 74 | + |
| 75 | +### Collapsing Stack Frames |
| 76 | + |
| 77 | +Navigating in deep stack frames can be challenging during debuging, due to the high number of stack frames that are not relevant most of the time, |
| 78 | +for example because they are provided by either the JDK, by a testing framework, or by a library. |
| 79 | +This feature tries to help focus on the stack frames that are coming from the user-created projects, |
| 80 | +drastically reducing the unnecessary noise in the Debug View. |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +The feature can be enabled from the Debug toolbar in `Debug > Java > Collapse Stack Frames`. |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +After enabling it, the view becomes much simpler and less intimidating: |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | +### Navigate to Variable Declaration |
| 93 | + |
| 94 | +Users can now navigate to a variable’s declaration directly from the Variables view during a debug session, |
| 95 | +making it easier to locate a variable, especially in methods with numerous local variables. |
| 96 | + |
| 97 | +Choose `Navigate to Declaration` from context menu of a variable. |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +The editor will jump and highlight its declaration. |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | +### Auto-Resuming Trigger Points |
| 106 | + |
| 107 | +Trigger points can now be configured to automatically resume execution when hit, |
| 108 | +allowing breakpoints after the trigger point to be activated while skipping those before it, |
| 109 | +thereby enabling a more focused and efficient debugging workflow. |
| 110 | + |
| 111 | +Upon enabling a trigger point, a new option will be shown to `Continue execution on hit` or not. |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | +Once `Continue execution on hit` is toggled, the breakpoint label will update to `[Resume on hit]` meaning it won't suspend on hit. |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | +Resume trigger also supports conditions, meaning if condition is true it will resume the execution otherwise it will suspend. |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | +Now when you run in debug mode, the trigger point won't hit, allowing you to skip previous breakpoints, and stop on the actual breakpoint on which you need to focus. |
| 124 | + |
| 125 | +For example, here `Resume trigger` was set on line number 7 and during debugging it hit on line number 8 by skipping all the previous breakpoints. |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | +<!-- |
| 130 | +### JDT Developers |
| 131 | +--> |
| 132 | + |
0 commit comments