Modern JVM languages such as Kotlin, Groovy, Scala and some others offer many language features that let you write code in a more concise and expressive manner. These features include type inference, properties, interpolated string, range and tuple literals, enhanced operators, closures, implicits, smart casts and many more.
This plugin extends the IDE’s folding features to emulate some of these modern languages’ features helping fight verbosity.
Fork of abandoned Advanced Java Folding
For more information, read the blog post.
- Lombok Emulator & Validator:
@Data
,@Getter
,@Setter
,@ToString
,@EqualsAndHashCode
,@NoArgsConstructor
,@AllArgsConstructor
,@RequiredArgsConstructor
,@Builder
,@Value
,@Log
,@Equals
,@HashCode
,@Serial
,@Constructor
(new),@LightValue
(new) - Extended java time folding
- Logger Brackets Folding: For Slf4j and other logging framework
- Extended null-safe ifs
- Display Optional as Kotlin Null-Safe
- Groovy spread operator in streams
- Display mapping of field with same name as << for builders
- Display mapping of field with same name as << for setters
- FieldShift for assignments
- Actions for folding and unfolding with key-shortcuts
- Kotlin quick return - ?.let { return it } and ?: return null
- Folding of testData in diff
- Destructuring assignment for array & list
- Simplify System.out.println to println
- @Nullable and @NotNull annotations
For more clarity, you may try to adjust your color scheme: go to Settings | Editor | Colors & Fonts | General | Text, select Folded text uncheck the Background color, and change the Foreground color to #000091 for the default scheme and #7CA0BB for Darcula.
To disable certain types of folding, go to Settings | Editor | General | Code Folding.
Tip
To install the Canary version of the plugin:
- Open Settings/Preferences > Plugins > ⚙️ > Manager Plugin Repositories
- Add the following URL: https://plugins.jetbrains.com/plugins/list?channel=canary&pluginId=23659
- Go to the Marketplace
- Search for advanced
Plugin based on the IntelliJ Platform Plugin Template.