Discussion:
Eclipse: Folding Code Blocks More Specific Than Methods?
(too old to reply)
Steve
2013-05-02 17:30:09 UTC
Permalink
I'm new to Eclipse.

I haven't found a way to fold blocks of code in Java smaller than a method.

I have a legacy project to maintain with huge and frequent nested
conditionals. Refractoring is not an option at this point.

I searched StackOverflow, there was some mention of a plugin called
Coffee Cup which enhances Eclipse code folding, but the Google site
where it is hosted said the project is no longer being developed and
there were no downloads to download.

Can anyone suggest an alternative?

I already have a better IDE, but I want to get used to using Eclipse for
a while because it seems to be an industry standard.

Thanks

Steve
Joerg Meier
2013-05-02 18:30:18 UTC
Permalink
Post by Steve
I'm new to Eclipse.
I haven't found a way to fold blocks of code in Java smaller than a method.
I have a legacy project to maintain with huge and frequent nested
conditionals. Refractoring is not an option at this point.
I searched StackOverflow, there was some mention of a plugin called
Coffee Cup which enhances Eclipse code folding, but the Google site
where it is hosted said the project is no longer being developed and
there were no downloads to download.
Can anyone suggest an alternative?
There are various custom region code folding plugins for Eclipse available,
though I believe the typical quality is relatively poor. "Eclipse custom
code folding" on Google should bring up helpful links.

Liebe Gruesse,
Joerg
--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
Lew
2013-05-02 19:35:46 UTC
Permalink
Post by Steve
I'm new to Eclipse.
I haven't found a way to fold blocks of code in Java smaller than a method.
Page-down.
Post by Steve
I have a legacy project to maintain with huge and frequent nested
conditionals. Refractoring is not an option at this point.
Get used to reading messy code.

Seriously - this is better, stronger and more sustainable than relying on a plugin.
Post by Steve
I searched StackOverflow, there was some mention of a plugin called
Coffee Cup which enhances Eclipse code folding, but the Google site
where it is hosted said the project is no longer being developed and >
there were no downloads to download.
Can anyone suggest an alternative?
Yeah. Hard work.
Post by Steve
I already have a better IDE, but I want to get used to using Eclipse for
a while because it seems to be an industry standard.
Concentrate on the task you have to solve and not the IDE you're using.

Eclipse isn't necessarily the best IDE out there. Yes, it is commonly used, as
are, for example, NetBeans and IntelliJ. I don't know that it requires any depth
of knowledge to use Eclipse effectively. Personally I use it the same way as any
other IDE and try not to rely too much on Eclipse-specific features.

I also never fold code. Comments occasionally, but not code. Really, just learn to
read the code. So it's tough. It's easier than tarring roofs.
--
Lew
Steve
2013-05-02 21:59:34 UTC
Permalink
Post by Lew
Post by Steve
I'm new to Eclipse.
I haven't found a way to fold blocks of code in Java smaller than a method.
Page-down.
Now, that is useful information.

There is no graphical indication that anything is folded up, just
disappeared line numbers, but it isn't a bad price for not having to
deal with a plugin.
Daniel Pitts
2013-05-02 22:12:42 UTC
Permalink
Post by Steve
I'm new to Eclipse.
I haven't found a way to fold blocks of code in Java smaller than a method.
I have a legacy project to maintain with huge and frequent nested
conditionals. Refractoring is not an option at this point.
Perhaps "refactoring" isn't an option, but "clean-as-you-go" should
always be an option. For instance, "introduce method" is invaluable for
nested/confusing conditionals or ugly blocks of code.
Post by Steve
Can anyone suggest an alternative?
IntelliJ ;-)
I have nothing against eclipse, other than I haven't really used it. I
have found IntelliJ to be a great and worthwhile IDE, to the point where
I would use it even if it wasn't "standard" or "supported" on the
projects I was working on.
Post by Steve
I already have a better IDE, but I want to get used to using Eclipse for
a while because it seems to be an industry standard.
Meh. It's free and better than Visual Studios and xcode combined. That
doesn't mean its a good IDE, it just means its "above average".
Steve
2013-05-03 13:23:09 UTC
Permalink
Post by Daniel Pitts
IntelliJ ;-)
Like I wrote, I already have a better IDE ( Visual Slickedit ) than
Eclipse.


I am learning Eclipse because it is defacto "industry standard" and I
think knowing it well could help me fit in at different shops. Many
tutorials on the web are also videos or screenshots of eclipse, so I see
value in myself becoming personally familiar with it.


I've read a lot of people recommending IntelliJ. I might just try it
out someday, but I doubt if I would use it. It is about $200 for a
personal license.

I've been using Visual Slickedit for about 14 years, paying $300 each
time I get a new version. If I completely migrate to another IDE, my
bias would toward one that is free or much lower in cost. That is a
big If. IntelliJ is written in Java, which will make it slower than
Visual Slickedit, which I believe is written in C and compiled. Visual
Slickedit boots fast enough to use it as a text editor for quick notes.
IntelliJ would have to have several MUST HAVE features that VSE does
not. The VSE company is always soliciting suggestions to keep up so it
probably wouldn't be long before VSE had it too.

All of which is my excessively verbose way of saying that I don't need a
better IDE, I'm learning Eclipse to fit in better as a Java programmer
and since IntelliJ is expensive it would have eons better than Slickedit
for me to migrate to it.
Post by Daniel Pitts
I have nothing against eclipse, other than I haven't really used it.
Daniel Pitts
2013-05-03 18:32:17 UTC
Permalink
Post by Steve
Post by Daniel Pitts
IntelliJ ;-)
Like I wrote, I already have a better IDE ( Visual Slickedit ) than
Eclipse.
I'll have to check out Visual Slickedit...
Post by Steve
I am learning Eclipse because it is defacto "industry standard" and I
think knowing it well could help me fit in at different shops. Many
tutorials on the web are also videos or screenshots of eclipse, so I see
value in myself becoming personally familiar with it.
No harm in being familiar with what "everyone uses". As long as you
don't use it only for that reason. Use it because you personally find
value of using it over alternatives. *Some* of that value will come
from "everyone uses it", but not all.
Post by Steve
I've read a lot of people recommending IntelliJ. I might just try it
out someday, but I doubt if I would use it. It is about $200 for a
personal license.
Yup. I've paid for my own when my company wouldn't, but now my company
pays for it. They also have good "upgrade" licenses which reduces the
TCO over time.
Post by Steve
I've been using Visual Slickedit for about 14 years, paying $300 each
time I get a new version. If I completely migrate to another IDE, my
bias would toward one that is free or much lower in cost. That is a
big If. IntelliJ is written in Java, which will make it slower than
Visual Slickedit, which I believe is written in C and compiled.
Being written in C and compiled does not guarantee being faster than
being in Java. Granted, Java (and IntelliJ) do sometimes have
GC/swapping issues, but that is more about the memory model than the
compiled code.
Post by Steve
Visual
Slickedit boots fast enough to use it as a text editor for quick notes.
IntelliJ would have to have several MUST HAVE features that VSE does
not. The VSE company is always soliciting suggestions to keep up so it
probably wouldn't be long before VSE had it too.
The big features in IntelliJ I like is its automatic code completion.
It is extremely smart about types and scope, it also is camel-case
aware. For example, if there is a method MyFoo findMyFoo(), and I want
the following code written: MyFoo foo = findMyFoo(); The keystrokes I
need are:
M-F (command-space) foo = (command-space); if there are other "MyFoo"
values (other variables or methods), then I need to differentiate
between them. It will provide a drop-down to show the ambiguity, but I
can type "fmf" or "fMF" to narrow it down to findMyFoo".

This might seem like a small gain, but I use it extensively. It's even
helpful when exploring a new API. It also has quick pop-up JavaDoc
viewing which helps for that purpose as well.

Next best feature: Automated Refactoring. Introduce
(constant/variable/method) are incredible. They will even automatically
find duplicate code which can be replaced by the newly created entity.
Extract Superclass/Interface are also awesome, but need a little more
oversight. Push members down/pull members up help with larger
refactoring tasks.
Post by Steve
All of which is my excessively verbose way of saying that I don't need a
better IDE, I'm learning Eclipse to fit in better as a Java programmer
and since IntelliJ is expensive it would have eons better than Slickedit
for me to migrate to it.
IntelliJ has free versions now too. The expensive version provides a few
nice-to-haves in enterprise level development (better XML folding,
Spring support, webapp support). While I use those features, they
aren't what sold me the product.
Post by Steve
Post by Daniel Pitts
I have nothing against eclipse, other than I haven't really used it.
I haven't used it in a while. Years probably. I recall it being slow,
and buggy. I might have just had a bad version.

I realize I sound like I'm in IntelliJ sales :-). I just like the
product, but I could care less if anyone else uses it. Unless jetbrains
starts paying me for testimonials ;-)

Anyway, good luck with Eclipse and its slow bugger plugins that almost
do what you want ;-)
Steve
2013-05-03 20:53:30 UTC
Permalink
Post by Daniel Pitts
No harm in being familiar with what "everyone uses". As long as you
don't use it only for that reason.
I used EMACS in college when everyone was using VI and I've used VSE for
the past 14 years where nobody at anyplace I ever worked was familiar
with it.
Post by Daniel Pitts
Yup. I've paid for my own when my company wouldn't, but now my company
pays for it. They also have good "upgrade" licenses which reduces the
TCO over time.
I've paid for slickedit a number of times too. At least IntelliJ is
$100 cheaper.
Post by Daniel Pitts
The big features in IntelliJ I like is its automatic code completion. It
is extremely smart about types and scope, it also is camel-case aware.
For example, if there is a method MyFoo findMyFoo(), and I want the
M-F (command-space) foo = (command-space); if there are other "MyFoo"
values (other variables or methods), then I need to differentiate
between them. It will provide a drop-down to show the ambiguity, but I
can type "fmf" or "fMF" to narrow it down to findMyFoo".
I take code completion in an IDE for granted. I've noticed that Eclipse
takes it to a bit more of a fancy level, similar to what you describe.

I'm not a 100% sure that VSE is camel case sensitive, but I think it is.
It just does so many things right that I take a lot for granted.
Post by Daniel Pitts
Next best feature: Automated Refactoring. Introduce
(constant/variable/method) are incredible. They will even automatically
find duplicate code which can be replaced by the newly created entity.
Extract Superclass/Interface are also awesome, but need a little more
oversight. Push members down/pull members up help with larger
refactoring tasks.
I've heard that Eclipse has something like this too. It sounds both
exciting and scarey.
Post by Daniel Pitts
I realize I sound like I'm in IntelliJ sales :-). I just like the
product, but I could care less if anyone else uses it. Unless jetbrains
starts paying me for testimonials ;-)
I know what you mean. I've gotten a few bosses to buy a few copies.
Many years ago they even sent me a t-shirt for being such a fan. I
think I've sold about 5 iMacs, but Apple never sent me a t-shirt :)
Daniel Pitts
2013-05-04 03:46:55 UTC
Permalink
Post by Steve
Post by Daniel Pitts
No harm in being familiar with what "everyone uses". As long as you
don't use it only for that reason.
I used EMACS in college when everyone was using VI and I've used VSE for
the past 14 years where nobody at anyplace I ever worked was familiar
with it.
I used vi when everyone else was using notepad or MS write ;-)
Post by Steve
Post by Daniel Pitts
Yup. I've paid for my own when my company wouldn't, but now my company
pays for it. They also have good "upgrade" licenses which reduces the
TCO over time.
I've paid for slickedit a number of times too. At least IntelliJ is
$100 cheaper.
Upgrading is discounted too if I recall. Something like $50 if you had a
previous version. If they're close to a new major release, the license
buys you both the current and the next.
Post by Steve
Post by Daniel Pitts
The big features in IntelliJ I like is its automatic code completion. It
is extremely smart about types and scope, it also is camel-case aware.
For example, if there is a method MyFoo findMyFoo(), and I want the
M-F (command-space) foo = (command-space); if there are other "MyFoo"
values (other variables or methods), then I need to differentiate
between them. It will provide a drop-down to show the ambiguity, but I
can type "fmf" or "fMF" to narrow it down to findMyFoo".
I take code completion in an IDE for granted. I've noticed that Eclipse
takes it to a bit more of a fancy level, similar to what you describe.
When I used eclipse, it had something similar to what IntelliJ had at
the time. IntelliJ's has improved significantly, to the point where they
reduced the confirmation step because they (rightfully) confident in
what they'd suggest to you.
Post by Steve
I'm not a 100% sure that VSE is camel case sensitive, but I think it is.
It just does so many things right that I take a lot for granted.
Post by Daniel Pitts
Next best feature: Automated Refactoring. Introduce
(constant/variable/method) are incredible. They will even automatically
find duplicate code which can be replaced by the newly created entity.
Extract Superclass/Interface are also awesome, but need a little more
oversight. Push members down/pull members up help with larger
refactoring tasks.
I've heard that Eclipse has something like this too. It sounds both
exciting and scarey.
It's a "power tool". Treat it with respect and you'll be fine. Treat it
causally and you'll end up without a thumb or worse ;-)
Post by Steve
Post by Daniel Pitts
I realize I sound like I'm in IntelliJ sales :-). I just like the
product, but I could care less if anyone else uses it. Unless jetbrains
starts paying me for testimonials ;-)
I know what you mean. I've gotten a few bosses to buy a few copies.
Many years ago they even sent me a t-shirt for being such a fan. I
think I've sold about 5 iMacs, but Apple never sent me a t-shirt :)
;-)

Anyway, I encourage you to compare Eclipse with IntelliJ. I believe
IntelliJ is common enough. It probably doesn't have quite the
market-share that Eclipse does, only because it costs so much. IntelliJ
does have a decent community, and a free version.

I'd like to know if you do try them both, and how you feel they compare
both to each other and to slickedit.

Thanks,
Daniel.

Loading...