4

Is there an Eclipse plugin that folds anonymous classes?

Preferably something that works like Intellij's closure folding: http://blogs.jetbrains.com/idea/2009/03/closure-folding-in-intellij-idea-9-maia/

I've looked at lambda4jdt, but it does not support newer versions of Eclipse.

epb
  • 454
  • 4
  • 15

1 Answers1

1

In Eclipse Preferences, check "Inner types" as element to be initially folded:

Inner types folding screenshot

Effect:

Before folding

is initially shown as

After folding

Modus Tollens
  • 5,083
  • 3
  • 38
  • 46
  • 2
    This just hides the body of the inner class, which is not very useful. Intellij and lambda4jdt still show the body of the inner class when folded. – epb Jul 09 '13 at 15:23
  • 1
    @burnsy I see. Unfortunately, there is no further development planned for lambda4jdt, and I can't find another plugin that provides a similar functionality. – Modus Tollens Jul 09 '13 at 16:08
  • Same here. Maybe everybody assumed that Java 8 lambdas were right around the corner. :) – epb Jul 09 '13 at 16:20
  • @burnsy I think so :). Hopefully someone else knows another way - or gets motivated to implement one... – Modus Tollens Jul 09 '13 at 16:22