通过文件名过滤eclipse中的警告 [英] Filtering warnings in eclipse by filename
问题描述
mainMenu_jsp.java有一个关于本地变量未被使用的警告。它是生成的代码,所以我不在乎,但我无法弄清楚如何通过文件名模式过滤任何警告。
我知道我可以定义一个工作集,但是因为我总是打开,关闭,有时候添加和删除项目,所以我不想要另一个手工簿记点,我必须保持最新。如果我添加一个新项目,忘记进去并将其添加到工作集中,我将不会收到任何警告,其中所有其他项目,我可能不会注意到。如果有办法将其设置为动态扩展以包括所有项目(不仅仅是现在),而且自动将其过滤自动应用于每个新项目,那么工作集才会有效。
只需使用工作集。有关如何在此处执行的详细信息:
从Eclipse问题视图中排除Unfixables
此处:
Eclipse问题视图
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. Working sets would only really work if there was a way to set them to dynamically expand to include all projects (not just all right now), and have their filtering automatically apply to each new project as it's added.
Just use a Working Set. Details about how to do it here: Excluding Unfixables from Eclipse Problem View
And here: Eclipse Problems view
这篇关于通过文件名过滤eclipse中的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!