Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only show warnings from some folders in eclipse

I am working in a larger Java codebase in eclipse, which currently issues around 7000 warnings. However I am working in rather isolated parts, in a few specific source folders and namespaces. I would like eclipse to only show warnings for my modules in the Problems tab, and not for the entire codebase. Currently it shows the first 100 warnings which are not related to my modules. Is this possible?

Update Thanks for all the nice answers. Updated the question a bit to make it clear that I am talking about multiple, albeit a rather small number, of folders and namespaces.

like image 281
Bjarke Freund-Hansen Avatar asked May 16 '11 12:05

Bjarke Freund-Hansen


3 Answers

In the Problems view there is a downward pointing triangle on the top right near the other view icons. Select that triangle and choose Configure Contents... from the menu. See below:

Configure Contents in Problem View

You can apply various configurations to control what elements show. I have the following configurations:

Configure Contents Dialog

Configure Contents Dialog

Notice that both of those configurations have the "On selected element and its children" scope selected. This will only show problems related to the file in the editor or package selected in the package view for instance.

like image 159
laz Avatar answered Oct 13 '22 13:10

laz


You could create a new "Working Set" and limit the warnings to the scope of the "Working set". To change the scope of your Problems-Tab select the "view-menu" (little triangle) and choose "configure contents" there you find various options to configure the scope.

like image 29
stacker Avatar answered Oct 13 '22 13:10

stacker


I believe that if you activate Mylyn on your project (in a task-focused interface), you can, in a task specifc context, have the problems view filtered to show only warnings relevant for your current "context".

Or you can configure then content of a problems view in order to display only the warnings/errors for the selected element.

configure content

selected element

like image 34
VonC Avatar answered Oct 13 '22 13:10

VonC