Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > contrib-release > by-pkgid > 95f5ae0ce06780fd3cab0be9375c9914 > files > 43

findbugs-manual-1.2.1-1.1.4mdv2008.1.x86_64.rpm

<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Chapter&nbsp;7.&nbsp;Using the FindBugs&#8482; Eclipse plugin</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" href="index.html" title="FindBugs&#8482; Manual"><link rel="up" href="index.html" title="FindBugs&#8482; Manual"><link rel="prev" href="anttask.html" title="Chapter&nbsp;6.&nbsp;Using the FindBugs&#8482; Ant task"><link rel="next" href="filter.html" title="Chapter&nbsp;8.&nbsp;Filter Files"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;7.&nbsp;Using the <span class="application">FindBugs</span>&#8482; Eclipse plugin</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="anttask.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="filter.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="eclipse"></a>Chapter&nbsp;7.&nbsp;Using the <span class="application">FindBugs</span>&#8482; Eclipse plugin</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="eclipse.html#d0e1458">1. Requirements</a></span></dt><dt><span class="sect1"><a href="eclipse.html#d0e1466">2. Installation</a></span></dt><dt><span class="sect1"><a href="eclipse.html#d0e1513">3. Using the Plugin</a></span></dt><dt><span class="sect1"><a href="eclipse.html#d0e1536">4. Troubleshooting</a></span></dt></dl></div><p>
The FindBugs Eclipse plugin allows <span class="application">FindBugs</span> to be used within
the <a href="http://www.eclipse.org/" target="_top">Eclipse</a> IDE.
The FindBugs Eclipse plugin was generously contributed by Peter Friese.
Phil Crosby and Andrei Loskutov contributed major improvements
to the plugin.
</p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1458"></a>1.&nbsp;Requirements</h2></div></div></div><p>
To use the <span class="application">FindBugs</span> Plugin for Eclipse, you need Eclipse 3.0.1 or later,
and JRE/JDK 1.4.0 or later.
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1466"></a>2.&nbsp;Installation</h2></div></div></div><p>
  We provide update sites that allow you to automatically install FindBugs into Eclipse and also query and install updates.
  There are three different update sites</p><div class="variablelist"><p class="title"><b>FindBugs Eclipse update sites</b></p><dl><dt><span class="term"><a href="http://findbugs.cs.umd.edu/eclipse/" target="_top">http://findbugs.cs.umd.edu/eclipse/</a></span></dt><dd><p>
       Only provides official releases of FindBugs.
      </p></dd><dt><span class="term"><a href="http://findbugs.cs.umd.edu/eclipse-candidate/" target="_top">http://findbugs.cs.umd.edu/eclips-candidate/</a></span></dt><dd><p>
          Provides official releases and release candidates of FindBugs.
        </p></dd><dt><span class="term"><a href="http://findbugs.cs.umd.edu/eclipse-daily/" target="_top">http://findbugs.cs.umd.edu/eclipse-daily/</a></span></dt><dd><p>
         Provides the daily build of FindBugs. No testing other than that it compiles. 
        </p></dd></dl></div><p>You can also manually
download the plugin from the following link:
<a href="http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_1.2.1.20070531.zip?download" target="_top">http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_1.2.1.20070531.zip?download</a>.
Extract it in Eclipse's "plugins" subdirectory.
(So &lt;eclipse_install_dir&gt;/plugins/edu.umd.cs.findbugs.plugin.eclipse_1.2.1.20070531/findbugs.png
should be the path to the <span class="application">FindBugs</span> logo.)

</p><p>
Once the plugin is extracted, start Eclipse and choose
<span class="guimenu">Help</span> &#8594; <span class="guimenuitem">About Eclipse Platform</span> &#8594; <span class="guimenuitem">Plug-in Details</span>.
You should find a plugin called "FindBugs Plug-in" provided by "FindBugs Project".
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1513"></a>3.&nbsp;Using the Plugin</h2></div></div></div><p>
To get started, right click on a Java project,
and select the option labeled "Find Bugs".
<span class="application">FindBugs</span> will run, and problem markers (displayed in source
windows, and also in the Eclipse Problems view) will point to
locations in your code which have been identified as potential instances
of bug patterns.
</p><p>
You may customize how <span class="application">FindBugs</span> runs by opening the Properties
dialog for a Java project, and choosing the "Findbugs" property page.
Options you may choose include:
</p><div class="itemizedlist"><ul type="disc"><li><p>
    Enable or disable the "Run FindBugs Automatically" checkbox.
    When enabled, FindBugs will run every time you modify a Java class
    within the project.
    </p></li><li><p>
    Choose minimum warning priority and enabled bug categories.
    These options will choose which warnings are shown.
    For example, if you select the "Medium" warning priority,
    only Medium and High priority warnings will be shown.
    Similarly, if you uncheck the "Style" checkbox, no warnings
    in the Style category will be displayed.
    </p></li><li><p>
    Select detectors.  The table allows you to select which detectors
    you want to enable for your project.
    </p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1536"></a>4.&nbsp;Troubleshooting</h2></div></div></div><p>
The <span class="application">FindBugs</span> Eclipse plugin is still experimental.&nbsp; This section
lists common problems with the plugin and (if known) how to resolve them.
</p><div class="itemizedlist"><ul type="disc"><li><p>
    If you do not see any <span class="application">FindBugs</span> problem markers (in your source
    windows or in the Problems View), you may need to change your
    Problems View filter settings.  See
    <a href="http://findbugs.sourceforge.net/FAQ.html#q7" target="_top">http://findbugs.sourceforge.net/FAQ.html#q7</a> for more information.
    </p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="anttask.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="filter.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;6.&nbsp;Using the <span class="application">FindBugs</span>&#8482; <span class="application">Ant</span> task&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;8.&nbsp;Filter Files</td></tr></table></div></body></html>