I'm using IntelliJ IDEA Community Edition 10 to develop a Java SE project.
My app takes a long time to start, so my preferred way of debugging the code is Launch -> Stop at a breakpoint -> Open the code evaluation window -> type in some code and see what it returns.
But the problem arises when my code returns a large array/collection of objects. What I want is filter the objects by value of a field or some other criteria.
I could use Apache Commons Collections or Google Guava to do the filtering, but IntelliJ IDEA's code evaluation does not allow creation of anonymous classes on-the-fly, which I need to define Predicates.
I could also use lambdaJ, but the classes of objects in my huge collections are declared final (and I can't change that), so lambdaJ cannot extend these classes for its operation.
I also tried to use BeanShell, but it requires me to pass the code as a string, which kills IDEA's code-completion. Also bsh cannot make use of local variables inside the process being debugged. Lastly, I have to specify full class names every time.
Can anyone help to find a solution to this problem? It might be some magical way to extend the IntelliJ IDEA's code evaluation to support anonymous classes, or another way to filter collections which will work in this situation.