ervandew/eclim — pull request #293 by cmore (2014-03-09 21:28:24+00:00)
Title: Check in first pass of a "-f" option for ProblemsCommand which

Background
---
For my day job, I work on a large old codebase that has generates a bazillion (okay, about 40K) eclipse warnings at a reasonable warning level. That's an overwhelming number, but I like to correct warnings when I'm visiting a file for a bug fix or feature addition. So, as an emacs-eclim user I wanted to add an option to filter warnings down to the current file.

This changes treats a -f option as specifying a source file to limit warnings to. It has no effect on error reporting.

Issues
-----
* The meaning of the "-f" option seems a little odd, since it only affects warning (and one might reasonably expect it to affect both). I'd be fine specifying it differently, (maybe via a "-fw" option, or something), but the all errors plus warnings for this particular file is a useful combo for an older codebase like my employer's. I'm happy to use a different option (or combination of options) to achieve the same effect.
* I'm not very familiar with the eclim and eclipse programming, so I don't know if there's a better way do a file compare besides using java.io.File to get the canonical path. I try to minimize the calls by only doing them if "-f" is specified, and if the file for the warning has changed from the previous warning. However, there might be a better/more-efficient way to do so in eclipse. In practice, it seems reasonably fast (and certainly much faster than emitting and parsing 40k warnings as JSON).
* I see I accidentally change indent level on two lines of a commit. I will redo, if need be.