Creating rules for hiding rows

Is there a way to create rules for hiding rows in the editor, just like the import statements can be hidden?
I would like to be able to hide rows with log statements for example.

0
3 comments
Avatar
Permanently deleted user

Hello Sakke,

SW> Is there a way to create rules for hiding rows in the editor, just
SW> like the import statements can be hidden? I would like to be able to
SW> hide rows with log statements for example.

It's not configurable through the UI, but you can create a plugin which manipulates
the FoldingModel of the editor to create fold regions for the lines which
you want to be folded.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

Alternatively you can fold current selection in editor by pressing Ctrl+Period.
-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

Hello Sakke,

SW>> Is there a way to create rules for hiding rows in the editor, just
SW>> like the import statements can be hidden? I would like to be able
SW>> to hide rows with log statements for example.
SW>>

It's not configurable through the UI, but you can create a plugin
which manipulates the FoldingModel of the editor to create fold
regions for the lines which you want to be folded.



0

For anyone finding this today: that plugin now exists. LogZen folds logger calls in Java (and other languages), including guarded if (log.isDebugEnabled()) { ... } blocks, into a single … logging … line. https://plugins.jetbrains.com/plugin/29467-logzen (disclaimer: I'm the author)

0

Please sign in to leave a comment.