5
It would be possible to minimize or expand only a code snippet inside a block {...}, example below: using the IDE eclipse?
5
It would be possible to minimize or expand only a code snippet inside a block {...}, example below: using the IDE eclipse?
3
If the editor is in English, the option is: Windows -> Preferences -> Java -> Editor -> Folding
To minimize all code snippets: Ctrl + Shift+ /
To expand all code snippets: Ctrl + Shift+ *
Save Master Sorack, I would like to expand and minimize just a chunk of code within a block(method, class, etc...), it would be just a chunk in Expecific.
I believe it’s possible, but I haven’t found anything that could help
0
Master, good night.
From what I’ve researched, there really isn’t a native functionality for what you want.
Maybe the closest you could find would be something like Regions of the C#.
As far as I know, our beloved Java does not have the same Feature. However, I have found a Eclipse IDE plugin that can help. This is Coffee Bytes, but it is discontinued, so the use is at your own risk.
Source of my research: How to Create a Region in eclipse like Visual Studio
Show, when arriving home I will make use of this plugin. If it works as expected, comment here. !
I was curious to know if you solved it. You got it?
Dude, I couldn’t use this plugin 'Coffe Bytes', you’ve already used it ?
-2
You can put a scope around what you want to minimize.
{
//AQUI VAI O QUE QUER MINIMIZAR
}
Note that on the left side, near the line count, a button will appear with the "-" to minimize.
I don’t think you understand my question.
I thought your question was how to minimize a piece of text in the eclipse
Browser other questions tagged java eclipse
You are not signed in. Login or sign up in order to post.
It’s not just enabling the Folding? https://stackoverflow.com/a/21968900
– hkotsubo
Yes, it is possible! However you can only minimize the methods of your class, as attached image.
– Victor Oliveira
Save @hkotsubo! So, my Folding is enabled even though it doesn’t show me the option to minimize/expand my comments...
– RXSD
Well, what I saw here is that Eclipse only enables Folding if you have any method statements right after the comments. If you have "loose" comments in the code, as in your example, the
-
and+
.– hkotsubo
@hkotsubo, well... The idea was to minimize comments within blocks of sack code? When enabling Folding, I realized that I had been able to minimize javadoc...
– RXSD
I did some tests here and apparently, inside the body of a method Folding is not enabled. In short: https://ideone.com/N9VrVS - I don’t know if it’s the version (I use Neon), or if you have some other config/plugin, or if it’s like that and there’s no way.. Anyway, sorry I can’t be of more help...
– hkotsubo
@hkotsubo thanks, I will continue researching... If I find a solution, comment here! Master hugs.
– RXSD