views:

669

answers:

4

We use Eclipse for our Java development, and we've got Maven compiling our JSPs into servlets to be used in our embedded Jetty instance. This means that to run the project from Eclipse, I have to include ./target/jsp-source as a source folder, which works great. The warnings that show up for that generated code are everywhere though, and I want to filter them out.

mainMenu_jsp.java has a warning about a local variable not being used. It's generated code, so I don't care about it, but I can't figure out how to filter out any warnings by filename pattern.

I know I can define a working set, but because I'm always opening,closing, and sometimes adding and deleting projects, I don't want another point of manual bookkeeping that I have to keep up to date. If I add a new project and forget to go in and add it to the working set, I won't get any warnings for it, which with all the other projects, I might not notice.

+1  A: 

Just use a Working Set. Details about how to do it here: Excluding Unfixables from Eclipse Problem View

And here: Eclipse Problems view

Kind Regards

marcospereira
First link is broken (March, 2010)
Jeeyoung Kim
A: 

A working set works well with multiple projects. I suggest you try using one.

Dov Wasserman
A: 

That doesn't work for a lot of situations.

For example, the Android Eclipse plug-in generates code into the same project.

A working set consists of one or more projects, in their entirety, so a working set can't filter out generated warnings that are intra-project.

A: 

I rate my own answer a minus -100, and I learned something super-useful: working sets can filter out parts of projects. It's simple to do--click on the project in the left pane of the working-set editor and expand it. Then only add what you want.

jimshowalter