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:
@Data
,@Getter
,@Setter
,@EqualsAndHashCode
,@ToString
- java.time.* isBefore/isAfter folding and LocalDate literals
- 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.
-
Using the Custom plugin repository:
Settings/Preferences > Plugins > ⚙️ > Manager Plugin Repositories
- add
- https://plugins.jetbrains.com/plugins/list?channel=canary&pluginId=23659
- goto Marketplace
- search for advanced
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
Plugin based on the IntelliJ Platform Plugin Template.