-- Custom plug-in filters --
As you surely know by now, the Eclipse Checkstyle Plug-in sports filters to exclude files from the
checks.
These filters are available on the plug-ins project properties page.
If filters are activated for a project they exclude certain files of the project from the checks based
on their specific implementation.
Many useful filters are already coming with the plug-in
distribution.
However you may need to implement other filters that are very specific to your
environment.
To enable you to write your own filters the plug-in defines an extension point for filters
net.sf.eclipsecs.core.filters
.
Example:
Using the net.sf.eclipsecs.core.filters
extension point in your plugin.xml
<extension
id="checkstyle.CheckstyleFilters"
point="net.sf.eclipsecs.core.filters">
<filter
name="Sample Filter"
internal-name="SampleFilter"
description="Sample Filter"
class="net.sf.eclipsecs.sample.filter.SampleFilter"/>
</extension>
The filter implementation class must implement the
net.sf.eclipsecs.core.projectconfig.filters.IFilter
interface.
To make life a bit
easier for you there is the net.sf.eclipsecs.core.projectconfig.filters.AbstractFilter
class
which implements already most of the filter interface.
For implementation samples have a look at the existing filter implementations in the
net.sf.eclipsecs.core
plugin.